Unique PathsA robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right a...
分类:
其他好文 时间:
2015-01-05 00:19:55
阅读次数:
231
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 of ...
分类:
其他好文 时间:
2015-01-04 22:38:14
阅读次数:
294
PuzzleA children's puzzle that was popular 30 years ago consisted of a 5x5 frame which contained 24 small squares of equal size. A unique letter of th...
分类:
其他好文 时间:
2015-01-04 15:07:09
阅读次数:
157
https://oj.leetcode.com/problems/unique-paths/http://blog.csdn.net/linhuanmars/article/details/22126357publicclassSolution{
publicintuniquePaths(intm,intn){
if(m<0||n<0)
return-1;//Invalidinput
//Start0,0
//Endm,n
//Useamatrix[m][n].
//Eachelementi..
分类:
其他好文 时间:
2015-01-04 11:36:10
阅读次数:
101
https://oj.leetcode.com/problems/unique-paths-ii/http://blog.csdn.net/linhuanmars/article/details/22135231publicclassSolution{
publicintuniquePathsWithObstacles(int[][]obstacleGrid){
//Validations
if(obstacleGrid==null||obstacleGrid.length==0||obstacleGrid..
分类:
其他好文 时间:
2015-01-04 11:34:38
阅读次数:
116
题目:(DP)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...
分类:
其他好文 时间:
2015-01-02 06:24:14
阅读次数:
195
今年的最后一篇了呢。。。好伤感的说,2014年还有1h就过去了不不不回到正题,这道题嘛~看上去好神啊!看到此题,我们可以联想到最优比例MST,于是就有了方法:首先二分答案ans,判断ans是否可行,那如何判断呢?每条边边权 - ans,之后在新的图中找负环即可。(可以用dfs版的spfa) 1 /....
分类:
其他好文 时间:
2014-12-31 23:58:29
阅读次数:
447
适当的使用索引可以提高数据检索速度,可以给经常需要进行查询的字段创建索引。
oracle的索引分为5种:唯一索引,组合索引,反向键索引,位图索引,基于函数的索引
创建Oracle索引的标准语法:
CREATE INDEX 索引名 ON 表名 (列名)
TABLESPACE 表空间名;
创建唯一索引:
CREATE unique INDEX 索引名 ON 表名 (列名)
T...
分类:
数据库 时间:
2014-12-31 10:04:34
阅读次数:
238
题目描述:
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...
分类:
其他好文 时间:
2014-12-30 11:49:09
阅读次数:
144
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...
分类:
其他好文 时间:
2014-12-30 08:09:14
阅读次数:
161