码迷,mamicode.com
首页 >  
搜索关键字:the unique mst    ( 5979个结果
【LeetCode】Permutations II 解题报告
【题目】 Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], an...
分类:其他好文   时间:2014-12-17 12:49:36    阅读次数:140
Unique Binary Search Trees II
这道题承接Unique Binary Search Trees,只需要返回搜索二叉树的个数,用DP求解。但是这道题需要得到所有树的集合,可以用DFS求解。 原题是这个样子的: 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...
分类:其他好文   时间:2014-12-17 00:23:26    阅读次数:191
【LeetCode】Combination Sum II (2 solutions)
Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sum...
分类:其他好文   时间:2014-12-16 16:39:06    阅读次数:264
【LeetCode】Combination Sum I & II 解题报告
【Combination Sum I】 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 cho...
分类:其他好文   时间:2014-12-16 11:45:46    阅读次数:186
排序,分组和集合操作
排序操作排序是计算机承担的最基本操作之一,尤其是在数据库处理领域,oracle也不例外。可能需要oracle排序数据的操作包括以下几种;(1)创建一个索引(2)通过groupby,unique或distinct关键字对数据进行分组或聚合(3)因为使用orderby子句使得数据按照排好的顺序返回(4)..
分类:编程语言   时间:2014-12-15 22:00:31    阅读次数:387
INDEX--从数据存放的角度看索引2
在上次中,我们说到"唯一非聚集索引"和“非唯一非聚集索引”在存储上有一个明显的差别:唯一非聚集索引的非叶子节点上不会包含RID的数据,让我们继续来深挖一下。准备测试数据:CREATE TABLE TB1( C1 INT, C2 INT, C3 INT)GOCREATE UNIQUE...
分类:其他好文   时间:2014-12-15 01:24:41    阅读次数:203
Unique Binary Search Trees
题目: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. ...
分类:其他好文   时间:2014-12-14 18:30:16    阅读次数:176
Unique path II
主要是边界1和,里面1赋值的问题了。 方法还是I的方法 这里突然忘了,二维数组如何得到x,y了 public int uniquePath(int[][] obstacleGrid){ int m=obstacleGrid.length; int n=obstacleGrid[0].length; ...
分类:其他好文   时间:2014-12-14 14:42:27    阅读次数:121
MapReduce 实现最小生成树
MapReduce 实现最小生成树...
分类:其他好文   时间:2014-12-14 10:43:01    阅读次数:413
LeetCode Longest Palindromic Substring
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...
分类:其他好文   时间:2014-12-14 00:38:30    阅读次数:161
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!