2015年11月26日

摘要: 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... 阅读全文
posted @ 2015-11-26 04:38 一心一念 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-11-26 04:36 一心一念 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2015-11-26 04:05 一心一念 阅读(153) 评论(0) 推荐(0) 编辑

导航