上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页
摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 先写comparat 阅读全文
posted @ 2017-11-12 06:37 jasminemzy 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given an integer arrays, find a contiguous subarray which has the largest sum and length should be greater or equal to given length k.Return the large 阅读全文
posted @ 2017-11-11 14:23 jasminemzy 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find two non-overlapping subarrays which have the largest sum.The number in each subarray should be contiguous.Return the 阅读全文
posted @ 2017-11-11 13:56 jasminemzy 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, 阅读全文
posted @ 2017-11-11 13:21 jasminemzy 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Implement pow(x, n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 1.二分法递归。 把pow(x,n)拆解为pow(x,n/2) 的平方 阅读全文
posted @ 2017-11-10 15:35 jasminemzy 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. private Comparator<ListNode> listComparator = new C 阅读全文
posted @ 2017-11-10 04:17 jasminemzy 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 问清楚需不需要创 阅读全文
posted @ 2017-11-09 14:03 jasminemzy 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that: Notice All words have th 阅读全文
posted @ 2017-11-08 06:13 jasminemzy 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be break into a space-separated sequence of one or more dictionary words. Example 阅读全文
posted @ 2017-11-06 06:51 jasminemzy 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Given a permutation which may contain repeated numbers, find its index in all the permutations of these numbers, which are ordered in lexicographical 阅读全文
posted @ 2017-11-05 10:32 jasminemzy 阅读(112) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页