上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页
摘要: 题目 Given a non empty string s and a dictionary wordDict containing a list of non empty words, determine if s can be segmented into a space separated s 阅读全文
posted @ 2017-08-01 14:18 lepeCoder 阅读(338) 评论(0) 推荐(0)
摘要: 题目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 分析 判断链表是否有环,采用快慢指针,如果相遇则表示有环 AC代码 阅读全文
posted @ 2017-07-31 21:03 lepeCoder 阅读(242) 评论(0) 推荐(0)
摘要: 题目 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up: Can 阅读全文
posted @ 2017-07-31 20:26 lepeCoder 阅读(264) 评论(0) 推荐(0)
摘要: 原题 Given a singly linked list L: L0?L1?…?Ln 1?Ln, reorder it to: L0?Ln?L1?Ln 1?L2?Ln 2?… You must do this in place without altering the nodes' values. 阅读全文
posted @ 2017-07-31 18:04 lepeCoder 阅读(217) 评论(0) 推荐(0)
摘要: 原题 Given a binary tree, return the preorder traversal of its nodes' values. 分析 对二叉树进行先序遍历,即根节点 左子树 右子树 代码: 递归: 递归代码十分简单,建立一个vector作为返回的结果,现将根节点push进去, 阅读全文
posted @ 2017-07-30 22:15 lepeCoder 阅读(353) 评论(0) 推荐(0)
摘要: __描述:__ Given a binary tree, return the postorder traversal of its nodes' values. 直接递归,按照 左子树 右子树 头结点的顺序 AC代码: 阅读全文
posted @ 2017-07-30 21:21 lepeCoder 阅读(284) 评论(0) 推荐(0)
摘要: __描述:__ Sort a linked list using insertion sort. 使用插入排序对一个链表进行排序 普通的插入排序,时间复杂度O(n^2) 阅读全文
posted @ 2017-07-30 13:12 lepeCoder 阅读(276) 评论(0) 推荐(0)
摘要: Sort a linked list in O(n log n) time using constant space complexity. 阅读全文
posted @ 2017-07-30 03:00 lepeCoder 阅读(378) 评论(0) 推荐(0)
摘要: sublime lincense for linux Sublime Text 3.x (after Build 3133)—– BEGIN LICENSE —–TwitterInc200 User LicenseEA7E-8900071D77F72E 390CDD93 4DCBA022 FAF60 阅读全文
posted @ 2017-07-26 14:58 lepeCoder 阅读(733) 评论(0) 推荐(0)
摘要: Sublime Text 3 includes an auto-upgrade mechanism on Windows and OS X to make upgrades a snap. Instead of going against the grain of the Linux ecosyst 阅读全文
posted @ 2017-07-26 14:51 lepeCoder 阅读(1299) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页