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-03-28 01:17:37
阅读次数:
137
题目链接:https://leetcode.com/problems/unique-binary-search-trees/从最简单的情况开始考虑:n = 0 : 只有“空树”这一种情况。f[0] = 1。n = 1 : 只有“根节点”这一种情况。f[1] = 1。 n = 2 :由于“根节点”必须...
分类:
其他好文 时间:
2015-03-27 23:47:24
阅读次数:
236
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-03-22 00:18:36
阅读次数:
134
裸的最小生成树..直接跑就行了----------------------------------------------------------------------#include#include#include#define rep(i,n) for(int i=0;i edges; vo....
分类:
其他好文 时间:
2015-03-22 00:12:44
阅读次数:
155
问题描述: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...
分类:
其他好文 时间:
2015-03-21 22:49:36
阅读次数:
156
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-03-21 17:10:57
阅读次数:
193
问题来源:https://leetcode.com/problems/unique-binary-search-trees//**
*
*
* ClassName UniqueBinarySearchTrees
*
*
* Description Given n, how many structurally unique BST's (binary searc...
分类:
其他好文 时间:
2015-03-21 12:40:04
阅读次数:
135
标题:Combination Sum II通过率:25.1%难度:中等Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the cand...
分类:
其他好文 时间:
2015-03-20 20:07:07
阅读次数:
111
题目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 triplet (a,b,c) must be ...
分类:
其他好文 时间:
2015-03-20 18:43:56
阅读次数:
168
use db_sqlserver;gocreate table db_table6( 订单编号 int primary key, 订单号 varchar(50) unique, 职工号 varchar(50) references db_table5(职工号), 订购日期 datetime...
分类:
数据库 时间:
2015-03-20 18:17:32
阅读次数:
221