Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's...
分类:
其他好文 时间:
2014-06-27 18:22:07
阅读次数:
191
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.
分类:
其他好文 时间:
2014-06-27 12:52:03
阅读次数:
213
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 longes...
分类:
其他好文 时间:
2014-06-27 12:46:45
阅读次数:
238
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of ...
分类:
其他好文 时间:
2014-06-27 12:27:28
阅读次数:
169
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic...
分类:
其他好文 时间:
2014-06-27 12:13:18
阅读次数:
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.
分类:
其他好文 时间:
2014-06-27 12:11:50
阅读次数:
337
The set [1,2,3,…,n] contains a total of n! unique permutations.
分类:
其他好文 时间:
2014-06-27 11:49:18
阅读次数:
152
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
分类:
其他好文 时间:
2014-06-27 11:47:58
阅读次数:
166
题目
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
...
分类:
其他好文 时间:
2014-06-27 07:06:50
阅读次数:
184
题意:平面上有若干个点,求最小生成树。有最多8个套餐,每个套餐有一个价格和若干个点,一旦购买套餐内的点就会相互连通。思路:由于套餐不是很多,所以枚举一下即可,然后最小生成树就行了。代码如下: 1 /**************************************************....
分类:
其他好文 时间:
2014-06-26 11:16:15
阅读次数:
313