- 博客(5)
- 资源 (3)
- 收藏
- 关注
原创 LeetCode - Max Consecutive Ones
原题网址: https://leetcode.com/problems/max-consecutive-ones/#/descriptionGiven a binary array, find the maximum number of consecutive 1s in this array.Example 1: Input: [1,1,0,1,1,1] Output: 3 Explana
2017-07-06 15:03:33 314
原创 LeetCode - Move Zeros
原题网址: https://leetcode.com/problems/move-zeroes/#/solutions题解: 令不为0的数从原数列首位依次向后放,后面的数位补零。class Solution(object): def moveZeroes(self, nums): """ :type nums: List[int] :rty
2017-07-06 14:50:11 353
原创 LeetCode - Search in Rotated Sorted Array
原题网址: https://leetcode.com/problems/search-in-rotated-sorted-array/#/descriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might
2017-07-06 13:31:55 254
原创 LeetCode - Remove Duplicates from Sorted Array II
原题网址: https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/#/descriptionFollow up for “Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted arra
2017-07-06 13:22:38 215
原创 LeetCode - Longest Consecutive Sequence
原题网址: https://leetcode.com/problems/longest-consecutive-sequence/#/descriptionGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example, Given [100
2017-07-06 13:15:59 196
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人