最新 最热

Leetcode 17 Letter Combinations of a Phone Number

Given a digit string, return all possible letter combinations that the number could represent. A ma

2018-01-12
1

Leetcode 7 Reverse Integer

Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321Easy,没什么好说的注意负数和溢出的情况class Solution {public: int reverse(...

2018-01-12
1

Leercode 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. You...

2018-01-12
2

Leetcode 34 Search for a Range

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O...

2018-01-12
1

Leetcode 33 Search in Rotated Sorted Array 二分查找变式

Suppose a sorted array 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 given a target value to...

2018-01-12
1

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 ...

2018-01-12
1

Leetcode 26 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 space for anothe...

2018-01-12
2

Leetcode 47 Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutat...

2018-01-12
2

Leetcode 46 Permutations

Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [...

2018-01-12
1

Leetcode 42 Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For exa...

2018-01-12
1