上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 80 下一页
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2015-03-11 21:45 匡子语 阅读(165) 评论(0) 推荐(0)
摘要: Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.题目关键点... 阅读全文
posted @ 2015-03-11 20:42 匡子语 阅读(193) 评论(0) 推荐(0)
摘要: 记录下可以用的中序遍历方法方法1:vector InOrderTraverse(TreeNode * root) //中序遍历 { vector ans; TreeNode* p; vector Stack; Stack.push_bac... 阅读全文
posted @ 2015-03-11 14:20 匡子语 阅读(301) 评论(0) 推荐(0)
摘要: Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA... 阅读全文
posted @ 2015-03-10 22:38 匡子语 阅读(311) 评论(0) 推荐(0)
摘要: Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.anagrams 的意思是两个词用相同的字母组成 比如 “dog" "go... 阅读全文
posted @ 2015-03-10 20:51 匡子语 阅读(200) 评论(0) 推荐(0)
摘要: Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.思路:自己脑子当机了,总是想着斜率和截距都要相同。但实际上三个点是一条直线的话只要它们的斜率相同就可以了,... 阅读全文
posted @ 2015-03-05 14:05 匡子语 阅读(264) 评论(0) 推荐(0)
摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ... 阅读全文
posted @ 2015-03-05 10:51 匡子语 阅读(259) 评论(0) 推荐(0)
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?思路:... 阅读全文
posted @ 2015-03-03 20:35 匡子语 阅读(325) 评论(0) 推荐(0)
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2015-03-03 18:40 匡子语 阅读(292) 评论(0) 推荐(0)
摘要: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文
posted @ 2015-03-03 13:59 匡子语 阅读(230) 评论(0) 推荐(0)
上一页 1 ··· 45 46 47 48 49 50 51 52 53 ··· 80 下一页