摘要:
Maximum SubarrayGiven an array of integers, find a contiguous subarray which has the largest sum.ExampleGiven the array [−2,2,−3,4,−1,2,1,−5,3], the c... 阅读全文
摘要:
Minimum SubarrayGiven an array of integers, find the subarray with smallest sum.Return the sum of the subarray.For [1, -1, -2, 1], return -3NoteThe su... 阅读全文
摘要:
Kth Largest ElementFind K-th largest element in an array.ExampleIn array [9,3,2,4,8], the 3rd largest element is 4.In array [1,2,3,4,5], the 1st large... 阅读全文