- 博客(9)
- 收藏
- 关注
原创 LeetCode 39. Combination Sum && 40. Combination Sum II && 216. Combination Sum III
39. Combination SumGiven a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number ma
2017-12-02 21:10:39 233 1
原创 LeetCode 35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.在一个有序数组中寻找目标值,如果找到就返回下标,找不到就返回它在有序数组中应该插入的位置。
2017-12-02 17:37:45 197
原创 LeetCode 34. Search for a Range
Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.Your algorithm’s runtime complexity must be in the order of O(log n).If the target is
2017-12-02 17:36:51 184
原创 LeetCode 33. Search in Rotated Sorted Array && 81. Search in Rotated Sorted Array II
###LeetCode 33. Search in Rotated Sorted Array Suppose 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 become 4 5 6 7 0 1 2).You are gi
2017-12-02 17:36:04 233
原创 LeetCode 31. Next Permutation
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible orde
2017-12-02 17:34:07 175
原创 LeetCode 27. Remove Element
Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-plac
2017-12-02 17:33:28 140
原创 LeetCode 26. Remove Duplicates from Sorted Array && 80. Remove Duplicates from Sorted Array II
LeetCode 26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for an
2017-12-02 17:32:30 149
原创 LeetCode 11. Container With Most Water
Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lin
2017-12-02 17:22:53 132
原创 LeetCode 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ele
2017-12-02 17:21:36 135
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人