### LeetCode题解

LeetCode题目解析

1 已关注
24篇博文
• #### LeetCode 34. Search for a Range

Given an array of integers sorted in ascending order, find the starting and ending position of a giv...

2017-09-17 21:29
86
• #### LeetCode 11. Container With Most Water

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai)....

2017-09-17 21:25
74
• #### LeetCode 39. Combination Sum

Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique ...

2017-09-17 21:32
90
• #### LeetCode 40. Combination Sum II

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations i...

2017-09-17 21:37
99
• #### LeetCode 48. Rotate Image

You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). ...

2017-09-17 21:42
84
• #### LeetCode 54. Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral or...

2017-09-17 21:47
95
• #### LeetCode 55. Jump Game

Given an array of non-negative integers, you are initially positioned at the first index of the arra...

2017-09-17 21:48
103
• #### LeetCode 56. Merge Intervals

Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,...

2017-09-17 21:53
98
• #### LeetCode 59. Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For...

2017-09-17 21:56
168
• #### LeetCode 62. Unique Paths

A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). Th...

2017-09-17 21:57
165
• #### LeetCode 63. Unique Paths II

Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique...

2017-09-17 21:59
95
• #### LeetCode 64. Minimum Path Sum

Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which...

2017-09-17 22:04
105
• #### LeetCode 74. Search a 2D Matrix

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the follo...

2017-09-17 22:07
93
• #### LeetCode 75. Sort Colors

Given an array with n objects colored red, white or blue, sort them so that objects of the same colo...

2017-09-17 22:11
91
• #### LeetCode 78. Subsets

Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not...

2017-09-17 22:13
103
• #### LeetCode 238. Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is eq...

2017-09-18 21:25
101
• #### LeetCode 209. Minimum Size Subarray Sum

Given an array of n positive integers and a positive integer s, find the minimal length of a contigu...

2017-09-18 21:32
107
• #### LeetCode 228. Summary Ranges

Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: ...

2017-09-18 21:40
87
• #### LeetCode 216. Combination Sum III

Find all possible combinations of k numbers that add up to a number n, given that only numbers fro...

2017-09-18 21:52
88
• #### LeetCode 79. Word Search

Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from ...

2017-09-18 21:59
81