### LeetCode题解

LeetCode.com于2013年底更新，共计151题，基本涵盖了常见的面试题目。

1032 已关注
152篇博文
• #### LeetCode | Reverse Words in a String

题目： Given an input string, reverse the string word by word. For example, Given s = "the sky is bl...

2014-08-25 22:22
18126
• #### LeetCode | Rotate Image

题目： You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (...

2013-12-23 10:06
3391
• #### LeetCode | Valid Number

题目： Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => f...

2013-09-15 00:25
2730
• #### LeetCode | Gray Code

题目： The gray code is a binary numeral system where two successive values differ in only one bit. ...

2013-09-29 10:56
2827
• #### LeetCode | Integer to Roman

题目： Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range f...

2013-09-15 10:31
2613
• #### LeetCode | Roman to Integer

题目： Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range f...

2013-09-15 11:20
3031
• #### LeetCode | First Missing Positive

题目： Given an unsorted integer array, find the first missing positive integer. For example, Given ...

2013-09-15 00:54
1762
• #### LeetCode | Clone Graph

题目： Clone an undirected graph. Each node in the graph contains a label and a list of its neighbor...

2014-01-03 22:42
9647
• #### LeetCode | Surrounded Regions

题目： Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is ...

2014-01-04 13:21
5968
• #### LeetCode | Copy List with Random Pointer

题目： A linked list is given such that each node contains an additional random pointer which could p...

2014-01-03 22:06
4228
• #### LeetCode | Candy

经典LeetCode问题，找到一个更加简单的方法~

2014-01-02 10:49
6435
• #### LeetCode | Trapping Rain Water

题目： Given n non-negative integers representing an elevation map where the width of each bar is ...

2013-12-31 16:35
2800
• #### LeetCode | Substring with Concatenation of All Words

题目： You are given a string, S, and a list of words, L, that are all of the same length. Find all s...

2013-12-31 16:17
2951
• #### LeetCode| Scramble String

题目： Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty su...

2013-12-31 15:24
3578
• #### LeetCode | Longest Valid Parentheses

题目： Given a string containing just the characters '(' and ')', find the length of the longest...

2013-12-31 13:56
1818
• #### LeetCode | Text Justification

题目： Given an array of words and a length L, format the text such that each line has exactly...

2013-12-27 01:00
1815
• #### LeetCode | Count and Say

题目： The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 12...

2013-12-26 23:02
1920
• #### LeetCode | Combination Sum II

题目： Given a collection of candidate numbers (C) and a target number (T), find all unique combin...

2013-12-26 22:45
1848
• #### LeetCode | Combination Sum

题目： Given a set of candidate numbers (C) and a target number (T), find all unique combinations ...

2013-12-26 22:34
1831
• #### leetCode | Next Permutation

题目： Implement next permutation, which rearranges numbers into the lexicographically next greater p...

2013-12-26 22:14
4128