![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法导论,分治算法
ginxal
这个作者很懒,什么都没留下…
展开
-
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 th原创 2017-09-17 17:33:13 · 157 阅读 · 0 评论 -
Maximum Subarray
这周学了分治算法,挑了LeetCode 上的问题,问题内容如下: 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,原创 2017-09-10 17:54:35 · 178 阅读 · 0 评论