![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Divide and Conquer
konsy_dong
Java,C++,Python,linux
展开
-
LeetCode 169. 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原创 2017-03-17 20:36:54 · 243 阅读 · 0 评论 -
LeetCode 4. Median of Two Sorted Arrays
题目: There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1: nums1 = [1, 3]原创 2017-04-19 10:21:31 · 218 阅读 · 0 评论 -
LeetCode 53. 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,-1,2,1] h原创 2017-05-01 11:23:48 · 300 阅读 · 0 评论