摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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, 阅读全文
摘要:
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) 的平方 阅读全文
摘要:
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. private Comparator<ListNode> listComparator = new C 阅读全文
摘要:
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. 问清楚需不需要创 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Given a permutation which may contain repeated numbers, find its index in all the permutations of these numbers, which are ordered in lexicographical 阅读全文