LeetCode题解

1 已关注
10篇博文
• leetcode-6. ZigZag Conversion

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (y...

2016-09-09 17:14
245
• leetcode-17. Letter Combinations of a Phone Number

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

2016-09-09 17:43
254
• leetcode-51. N-Queens

The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens ...

2016-09-09 15:30
245
• leetcode-52. N-Queens II

Follow up for N-Queens problem. Now, instead outputting board configurations, return the total nu...

2016-09-09 17:05
221
• leetcode-66. Plus One

Given a non-negative number represented as an array of digits, plus one to the number. The digits...

2016-09-02 00:34
198
• leetcode-122. Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i. Design an...

2016-08-30 22:59
195
• leetcode-134. Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. Yo...

2016-08-29 20:05
266
• leetcode-135. Candy

There are N children standing in a line. Each child is assigned a rating value. You are giving ca...

2016-08-29 21:43
294
• leetcode-207. Course Schedule

There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have...

2016-08-30 23:15
191
• leetcode-310. Minimum Height Trees

For a undirected graph with tree characteristics, we can choose any node as the root. The result gra...

2016-08-31 21:26
210