DivideAndConquer
weixin_39145266
这个作者很懒,什么都没留下…
展开
-
23 Merge k Sorted Lists
1 题目Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2->6]Output: 1->1->2->3-...原创 2019-12-01 15:06:16 · 64 阅读 · 0 评论 -
215 Kth Largest Element in an Array
1 题目Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Example 1:Input: [3,2,1,5,6,4] and k = 2Output:...原创 2019-04-16 16:22:33 · 84 阅读 · 0 评论 -
53 Maximum Subarray
1 题目Given an integer arraynums, find the contiguous subarray(containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Exp...原创 2019-04-26 10:01:06 · 65 阅读 · 0 评论 -
241 Different Ways to Add Parentheses
1 题目Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example ...原创 2019-04-24 12:19:29 · 55 阅读 · 0 评论