Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2015-01-16 23:38:32
阅读次数:
178
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where
the candidate numbers sums to T.
Each number in C may only be used once in the combina...
分类:
其他好文 时间:
2015-01-16 16:47:18
阅读次数:
152
The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:21358Accepted:7560DescriptionGiven a connected undirected graph, tell if its minim...
分类:
其他好文 时间:
2015-01-16 16:18:13
阅读次数:
172
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the ...
分类:
其他好文 时间:
2015-01-15 23:56:23
阅读次数:
294
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively
in the ...
分类:
其他好文 时间:
2015-01-15 23:54:55
阅读次数:
206
题目:Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
思路:题目要求的s的一个最长回...
分类:
编程语言 时间:
2015-01-15 23:54:08
阅读次数:
207
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where
the candidate numbers sums to T.
The same repeated number may be chosen from C unlimited numb...
分类:
其他好文 时间:
2015-01-15 18:17:48
阅读次数:
186
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's 1 .....
分类:
其他好文 时间:
2015-01-14 22:37:54
阅读次数:
241
PermutationSequence https://oj.leetcode.com/problems/permutation-sequence/The set [1,2,3,…,n] contains a total of n! unique permutations.By listing a....
分类:
其他好文 时间:
2015-01-14 19:50:23
阅读次数:
136
题目:
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 ...
分类:
编程语言 时间:
2015-01-14 16:58:27
阅读次数:
222