uuid:uuid库是一个小的使用工具,可以表示和生成UUIDUUID是University Unique Identifier的缩写,它是一个128位的数字(16字节),不需要有一个中央认证机构就可以创建全国唯一的标示符。别名:GUIDuuid位于名字空间boost::uuisd,没有集中的头文件...
分类:
其他好文 时间:
2014-08-07 15:38:30
阅读次数:
259
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...
分类:
其他好文 时间:
2014-08-07 00:16:36
阅读次数:
276
1 public static String[] array_unique(String[] a) {2 Set set = new HashSet();3 set.addAll(Arrays.asList(a));4 return set.toArray(new String[0]);5 }
分类:
其他好文 时间:
2014-08-06 18:38:11
阅读次数:
215
约束的目的就是确保表中的数据的完整性。常用的约束类型如下:主键约束:(Primary Key constraint) 要求主键列唯一,并且不允许为空唯一约束:(Unique Constraint)要求该列唯一,允许为空,但只能出现一个空值检查约束:(Check Constraint)某列取值范围限制...
分类:
数据库 时间:
2014-08-05 22:30:40
阅读次数:
304
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-08-05 18:09:19
阅读次数:
168
题目原文:
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of
S is 1000, and there exists one unique longest palindromic substring.
题意解析:
最长回文子串。就是...
分类:
其他好文 时间:
2014-08-05 15:56:59
阅读次数:
290
链接:http://poj.org/problem?id=1679
题意:告诉你有n个点,m条边,以及m条边的信息(起点、终点、权值),判断最小生成树是否唯一
判断MST是否唯一的思路是这样:对于每条边如果有和他相等权值的边,则做一个标记,然后进行一遍kruskal或prim找出最小生成树权值,然后对于每个使用过并且有相等边标记的边,把它从图中删去,再进行一遍kruskal或prim,...
分类:
其他好文 时间:
2014-08-05 14:12:39
阅读次数:
308
Non-unique ElementsYou are given a non-empty list of integers (X). For this task, you should return a list consisting of only the non-unique elements ...
分类:
其他好文 时间:
2014-08-05 10:48:49
阅读次数:
210
问题:n个结点总共有多少个二叉搜索树分析:n=1,sum1=1 n=2,sum2=2; n=3,sum3=2(头结点为1)+1(头结点为2)+2(头结点为3) n=4,sum4=5(头结点为1,sum3)+2(头结点为2,sum1*sum2)+2(头结点为3,sum2*sum1)+...
分类:
其他好文 时间:
2014-08-04 13:53:47
阅读次数:
193
题目:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo....
分类:
编程语言 时间:
2014-08-04 04:10:26
阅读次数:
374