Given n, how many structurally unique BSTs (binary search trees) that store values 1...n? Example Given n = 3, there are a total of 5 unique BST's. 1 ...
分类:
其他好文 时间:
2016-04-07 13:18:18
阅读次数:
133
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n ...
分类:
其他好文 时间:
2016-04-07 13:18:14
阅读次数:
108
Given an directed graph, a topological order of the graph nodes is defined as follow: For each directed edge A -> B in graph, A must before B in the o ...
分类:
其他好文 时间:
2016-04-07 12:04:53
阅读次数:
162
Given two array of integers(the first array is array A, the second array is array B), now we are going to find a element in array A which is A[i], and ...
分类:
其他好文 时间:
2016-04-07 09:30:58
阅读次数:
106
Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes ...
分类:
其他好文 时间:
2016-04-07 08:20:37
阅读次数:
124
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround ...
分类:
其他好文 时间:
2016-04-07 08:20:05
阅读次数:
133
Given a linked list and two values v1 and v2. Swap the two nodes in the linked list with values v1 and v2. It's guaranteed there is no duplicate value ...
分类:
其他好文 时间:
2016-04-07 08:17:16
阅读次数:
120
Ugly number is a number that only have factors 2, 3 and 5. Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, ...
分类:
其他好文 时间:
2016-04-07 07:11:09
阅读次数:
149
Given a set of distinct integers, return all possible subsets. Notice Elements in a subset must be in non-descending order. The solution set must not ...
分类:
其他好文 时间:
2016-04-07 07:06:36
阅读次数:
109
Given a list of numbers that may has duplicate numbers, return all possible subsets Notice Each element in a subset must be in non-descending order. T ...
分类:
其他好文 时间:
2016-04-07 07:04:43
阅读次数:
133