因为实验室项目好久没刷题了。从今天开始重新开始刷题。 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers...
分类:
其他好文 时间:
2014-07-16 23:04:15
阅读次数:
166
方法一:借助auto、decltype、unique_ptr、Lambda表达式构造 sqlite3 *db = NULL; auto deleter = [](sqlite3 *pdb){sqlite3_close(pdb);} int nRet = sqlite3_open16(L"F:\\my...
分类:
编程语言 时间:
2014-07-16 22:59:07
阅读次数:
385
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each num...
分类:
其他好文 时间:
2014-07-16 19:53:49
阅读次数:
238
语言:Python描述:使用递归实现 1 class Solution: 2 # @return an integer 3 def numTrees(self, n): 4 if n == 0: 5 return 0 6 eli...
分类:
其他好文 时间:
2014-07-11 23:44:08
阅读次数:
216
Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sum...
分类:
其他好文 时间:
2014-07-11 08:41:13
阅读次数:
156
使用该语法可在插入记录的时候先判断记录是否存在,如果不存在则插入,否则更新,很方便,无需执行两条SQL
这个语句知识mysql中,而标准sql语句中是没有的。
INSERT INTO .. ON DUPLICATE KEY更新多行记录
如果在INSERT语句末尾指定了ON DUPLICATE KEY UPDATE,并且插入行后会导致在一个UNIQUE索引或PRI...
分类:
数据库 时间:
2014-07-11 08:24:56
阅读次数:
289
Algorithm.( Augmenting Path Algorithm )
Input:
An X-Y bigraph G, a matching M in G,
and the set U of M-unsaturated vertices in X.
Idea:
Explore M-alternating paths form...
分类:
其他好文 时间:
2014-07-10 23:03:47
阅读次数:
211
3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:El...
分类:
其他好文 时间:
2014-07-09 15:48:57
阅读次数:
223
解决:
选择项目名称-->Targets-->Build Settings-->Search Paths-->Library Search Paths 删除对应路径...
分类:
其他好文 时间:
2014-07-09 11:12:33
阅读次数:
274
unique_ptr是一个独享所有权的智能指针,它提供了一种严格语义上的所有权,包括:
1、拥有它所指向的对象。
2、无法进行复制构造,也无法进行复制赋值操作。也就是说,我们无法得到指向同一个对象的两个unique_ptr。但是可以进行移动构造和移动赋值操作。
3、保存指向某个对象的指针,当它本身被删除释放的时候(比如,离开了某个作用域),会使用给定的删除器释放它指向...
分类:
编程语言 时间:
2014-07-08 17:23:41
阅读次数:
271