上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 36 下一页
摘要: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled u... 阅读全文
posted @ 2015-01-05 06:09 LiBlog 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Update (2014-11-02):The s... 阅读全文
posted @ 2015-01-04 07:08 LiBlog 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to show corn... 阅读全文
posted @ 2015-01-04 06:01 LiBlog 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文
posted @ 2015-01-04 05:27 LiBlog 阅读(245) 评论(0) 推荐(0) 编辑
摘要: As the title described, you should only use two stacks to implement a queue's actions.The queue should support push(element), pop() and top() where po... 阅读全文
posted @ 2015-01-01 00:58 LiBlog 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given two values k1 and k2 (where k1 searchRange(TreeNode root, int k1, int k2) {19 ArrayList res = searchRangeRecur(root,k1,k2);20 r... 阅读全文
posted @ 2015-01-01 00:40 LiBlog 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Given n items with size A[i] and value V[i], and a backpack with size m. What's the maximum value can you put into the backpack?NoteYou cannot divide ... 阅读全文
posted @ 2015-01-01 00:07 LiBlog 阅读(304) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray.NoteThe subarray should contain at least one integer.Ex... 阅读全文
posted @ 2014-12-31 23:37 LiBlog 阅读(588) 评论(0) 推荐(0) 编辑
摘要: Given a string which contains only letters. Sort it by lower case first and upper case second.NoteIt's not necessary to keep the original order of low... 阅读全文
posted @ 2014-12-31 23:32 LiBlog 阅读(500) 评论(0) 推荐(0) 编辑
摘要: Given two strings, find the longest comment subsequence (LCS).Your code should return the length of LCS.ExampleFor "ABCD" and "EDCA", the LCS is "A" (... 阅读全文
posted @ 2014-12-31 23:22 LiBlog 阅读(175) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 36 下一页