Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-01-06 23:07:00
阅读次数:
208
题目:
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 zero.
Note:
Elements in a tripl...
分类:
编程语言 时间:
2015-01-06 10:06:42
阅读次数:
130
题目:(DP)Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return al...
分类:
其他好文 时间:
2015-01-06 00:41:27
阅读次数:
147
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-06 00:37:47
阅读次数:
204
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ...
分类:
其他好文 时间:
2015-01-05 23:22:28
阅读次数:
138
The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie...
分类:
其他好文 时间:
2015-01-05 21:54:01
阅读次数:
194
https://oj.leetcode.com/problems/unique-binary-search-trees/http://blog.csdn.net/linhuanmars/article/details/24761459publicclassSolution{
publicintnumTrees(intn)
{
//See
//http://blog.csdn.net/linhuanmars/article/details/24761459
//r0=0;
//r1=1;
//r2=2;
//..
分类:
其他好文 时间:
2015-01-05 18:57:26
阅读次数:
201
题目描述:
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 unl...
分类:
其他好文 时间:
2015-01-05 13:07:20
阅读次数:
113
【题目】Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum...
分类:
其他好文 时间:
2015-01-05 10:54:18
阅读次数:
146
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 bott...
分类:
其他好文 时间:
2015-01-05 08:18:16
阅读次数:
214