动态规划Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longes...
分类:
其他好文 时间:
2014-12-01 20:48:25
阅读次数:
250
Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm...
分类:
其他好文 时间:
2014-12-01 15:49:31
阅读次数:
182
primary key和unique约束是要依赖index的,下面通过试验来看看他们之间的依赖关系!SQL> select * from tt;ID NA---------- --1 a2 b3 c4 d5 e6 f1000 h已选择7行。SQL> alter table tt add constr...
分类:
其他好文 时间:
2014-12-01 12:39:11
阅读次数:
322
一.unique函数类属性算法unique的作用是从输入序列中“删除”所有相邻的重复元素。该算法删除相邻的重复元素,然后重新排列输入范围内的元素,并且返回一个迭代器(容器的长度没变,只是元素顺序改变了),表示无重复的值范围得结束。 1 // sort words alphabetically so ...
分类:
编程语言 时间:
2014-11-30 22:58:32
阅读次数:
273
导读最近在补看《C++ Primer Plus》第六版,这的确是本好书,其中关于智能指针的章节解析的非常清晰,一解我以前的多处困惑。C++面试过程中,很多面试官都喜欢问智能指针相关的问题,比如你知道哪些智能指针?shared_ptr的设计原理是什么?如果让你自己设计一个智能指针,你如何完成?等等……。而且在看开源的C++项目时,也能随处看到智能指针的影子。这说明智能指针不仅是面试官爱问的题材,更是...
分类:
编程语言 时间:
2014-11-29 23:09:08
阅读次数:
422
Hibernate的1-1映射关系主要分为两类: 1.Hibernate基于外键映射的1对1关联关系 对于基于外键的1-1关联,其外键可以存放在任意一边,在需要存放外键一端,增加many-to-one元素。为many-to-one元素增加unique="true"属性表示为1-1关联1 另一端...
分类:
Web程序 时间:
2014-11-29 22:57:11
阅读次数:
286
The Unique MST
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 21119
Accepted: 7451
Description
Given a connected undirected graph, tell if its minimum s...
分类:
其他好文 时间:
2014-11-29 11:58:05
阅读次数:
172
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-11-29 06:47:54
阅读次数:
165
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique BST'...
分类:
其他好文 时间:
2014-11-29 06:36:51
阅读次数:
160
动态规划二位数组 1 class Solution { 2 public: 3 int uniquePaths(int m, int n) { 4 //c[i][j] = c[i-1][j] + c[i][j-1]; 5 if(m==0 || n==0) 6 ...
分类:
其他好文 时间:
2014-11-28 20:06:50
阅读次数:
177