分治算法
LanceLee_lby
这个作者很懒,什么都没留下…
展开
-
Maximum Subarray
原题: 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,1,-5,4], the contiguous subarray [4,-原创 2017-03-17 21:32:21 · 134 阅读 · 0 评论 -
Majority Element
题目:Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the array is non-empty and the majority eleme原创 2017-03-06 22:32:52 · 129 阅读 · 0 评论