- 博客(19)
- 收藏
- 关注
LeetCode-34-Search for a Range
Search for a Range 来自 <https://leetcode.com/problems/search-for-a-range/> Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm...
2015-08-31 08:45:15 138
原创 LeetCode-73-Set Matrix Zeroes
Matrix Zeroes 来自 <https://leetcode.com/problems/set-matrix-zeroes/> Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up...
2015-08-30 13:56:44 104
原创 LeetCode-35-Search Insert Position
Search Insert Position 来自 <https://leetcode.com/problems/search-insert-position/> Given a sorted array and a target value, return the index if the target is found. If not, return the inde...
2015-08-30 09:23:11 119
原创 LeetCode-62-Unique Paths*(动态规划)
Unique Paths 来自 <https://leetcode.com/problems/unique-paths/> A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).The robot can only move...
2015-08-29 20:22:23 116
原创 LeetCode-79-Word Search*
Word Search 来自 <https://leetcode.com/problems/word-search/> Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of ...
2015-08-29 11:15:51 123
LeetCode-15-3Sum*
3Sum 来自 <https://leetcode.com/problems/3sum/> Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array wh...
2015-08-27 20:53:03 122
原创 LeetCode-209-Minimum Size Subarray Sum
Minimum Size Subarray Sum 来自 <https://leetcode.com/problems/minimum-size-subarray-sum/> Given an array of n positive integers and a positive integer s, find the minimal length of a subar...
2015-08-27 14:28:22 133
原创 Leetcode-217-Contains Duplicate
Contains Duplicate来自 <https://leetcode.com/problems/contains-duplicate/> Given an array of integers, find if the array contains any duplicates. Your function should return true if any valu...
2015-08-27 08:41:21 129
原创 Leetcode-219-Contains Duplicate II
Contains Duplicate II来自 <https://leetcode.com/problems/contains-duplicate-ii/> Given an array of integers and an integer k, find out whether there are two distinct indices i and j in th...
2015-08-27 08:40:25 126
原创 Leetcode-228-Summary Ranges
Summary Ranges 来自 <https://leetcode.com/problems/summary-ranges/> Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], re...
2015-08-27 08:38:48 98
原创 Leetcode-169-Majority Element
Majority Element 来自 <https://leetcode.com/problems/majority-element/> Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊...
2015-08-26 14:53:16 84
Leetcode-88-Merge Sorted Array
Merge Sorted Array 来自 <https://leetcode.com/problems/merge-sorted-array/> Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may a...
2015-08-26 10:04:15 86
原创 Leetcode-119-Pascal's Triangle II
Pascal's Triangle II 来自 <https://leetcode.com/problems/pascals-triangle-ii/> Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3,Return [1,3,3,1]...
2015-08-26 09:27:47 118
原创 Leetcode-118-Pascal's Triangle
Pascal's Triangle 来自 <https://leetcode.com/problems/pascals-triangle/> Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5,Return[ [1]...
2015-08-26 08:51:18 84
原创 Leetcode-66-Plus One
Plus One 来自 <https://leetcode.com/problems/plus-one/> Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most sig...
2015-08-26 08:30:28 96
原创 Leetcode-80-Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array II 来自 <https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/> Follow up for "Remove Duplicates": What if duplicates are...
2015-08-25 23:36:54 109
原创 Leetcode-26-Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra spa...
2015-08-25 23:21:50 82
原创 Leetcode-27-Remove Element
Remove Element Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond th...
2015-08-25 20:52:32 76
原创 Leetcode-189-Rotate Array
Rotate Array:Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:Try to come up as many soluti...
2015-08-25 15:25:35 103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人