class Solution { public: vector >
permuteUnique(vector &num) { vector > result; if (num.size() path;
dfs(n...
分类:
其他好文 时间:
2014-06-29 14:09:34
阅读次数:
220
文本特征向量 经典的向量空间模型(VSM: Vector Space
Model)由Salton等人于60年代提出,并成功地应用于著名的SMART文本检索系统。VSM概念简单,把对文本内容的处理简化为向量空间中的向量运算,并且它以空间上的相似度表达语义的相似度,直观易懂。当文档被表示为文档空间的向量...
分类:
其他好文 时间:
2014-06-07 06:02:47
阅读次数:
248
1.vector
vector是数组的一种类表示,它提供了自动内存管理功能,可以动态的改变vector对象的长度,并随着元素的添加和删除而增大和缩小,它提供了对元素的随机访问,在尾部添加和删除元素的时间是固定的。但是在头部或者中间插入和删除元素的复杂度是线性时间。(足以说明vector是数组。插入
...
分类:
其他好文 时间:
2014-06-07 04:43:51
阅读次数:
216
#includevoid ShellSort(int *a,int length){ int
jump=length; int temp=0; int change=1; while(jump>0) //while1 { jump=jump/2;
change=1; /***************...
分类:
其他好文 时间:
2014-06-07 03:53:30
阅读次数:
243
今天学习了STL
以前用的c,可是比赛回来发现c有点弱,c++的stl是比较实用的,适合比赛.所以学习了一下.vector.这是一个容器,其实就是线性表.使用之前在头部加上#include
然后就可以使用vector vec; //type is a kind of basic type (eg. ...
分类:
其他好文 时间:
2014-06-07 03:35:31
阅读次数:
176
Global cursor:To change the cursor in a
application wide fashion, you have to access the Glass Pane and set its cursor,
and then make the glass pane v...
分类:
编程语言 时间:
2014-05-30 11:18:29
阅读次数:
284
class Solution {public: int maxProfit(vector
&prices) { if(prices.size() == 0) return 0; vector f1(prices.size()); int
minV = pri...
分类:
其他好文 时间:
2014-05-30 02:54:28
阅读次数:
231
第一节:vector简介 vector是一种典型的类模板,使用的时候必须进行实例化。 vector的数据存储在数组上,支持随机访问迭代器,支持下标操作[]和at操作,支持手动扩容和自动容量增长。 vector是STL中的最常用容器,并支持STL的通用算法。第二节:vector的迭代器介绍 vecto...
分类:
其他好文 时间:
2014-05-29 09:46:33
阅读次数:
230
class Solution {public: vector > ret; vector
subret;public: vector > fourSum(vector &num, int target) {
sort(num.begin(),num.end()); ...
分类:
其他好文 时间:
2014-05-29 09:31:13
阅读次数:
288
class Solution { public: vector >
generateMatrix(int n) { vector > matrix; if (n (n, 0)); }...
分类:
其他好文 时间:
2014-05-28 09:42:14
阅读次数:
233