LeetCode
zhongdaliutao
这个作者很懒,什么都没留下…
展开
-
LeetCode OJ|Divide and Conquer| Search a 2D Matrix II
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers in原创 2017-03-18 12:27:39 · 221 阅读 · 0 评论 -
LeetCode|Array|Teemo Attacking
In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning tim原创 2017-03-12 10:59:04 · 205 阅读 · 0 评论 -
LeetCode OJ|Array|Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array.Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutive 1s. The原创 2017-03-06 14:12:12 · 211 阅读 · 0 评论 -
LeetCode OJ|Array|Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.原创 2017-03-06 13:33:46 · 274 阅读 · 0 评论 -
LeetCode OJ|Divide and Conquer|Kth Largest Element in an Array
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,Given [3,2,1,5,6,4] and k = 2, return 5.原创 2017-03-26 09:17:01 · 270 阅读 · 0 评论 -
LeetCode OJ|Array| Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.原创 2017-03-12 10:16:06 · 182 阅读 · 0 评论