![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode Array
XieCH1995
这个作者很懒,什么都没留下…
展开
-
LeetCode167 and 1 Two Sum
LeetCode Array 167 Two Sum II - Input array is sorted Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The ...原创 2018-03-15 21:11:32 · 223 阅读 · 0 评论 -
LeetCode 485 Max Consecutive Ones
LeetCode 485 Max Consecutive OnesGiven a binary array, find the maximum number of consecutive 1s in this array.Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the...原创 2018-03-15 21:22:47 · 225 阅读 · 0 评论 -
LeetCode 695. Max Area of Island
LeetCode 695. Max Area of IslandGiven a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all...原创 2018-03-15 21:29:24 · 176 阅读 · 0 评论 -
LeetCode 169 Majority Element(Majority Voting Algorithm)
Majority ElementGiven 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 major...原创 2018-03-17 21:02:10 · 235 阅读 · 0 评论