一、非变异算法
是一组不破坏操作数据的模板函数,用来对序列数据进行逐个处理、元素查找、子序列搜索、统计和匹配。非变异算法具有极为广泛的适用性,基本上可应用与各种容器。
1查找容器元素find
它用于查找等于某值的元素。它在迭代器区间[first,last)(闭开区间)上查找等于value值的元素,如果迭代器i所指的元素满足*i=value,则返回迭代器i;未找到满足条件的元素,返...
分类:
其他好文 时间:
2014-08-07 18:59:50
阅读次数:
306
问题:最后一个单词的长度分析,注意s=" a b "这种情况,从后遍历单词,遇到空格退出class Solution {public: int lengthOfLastWord(const char *s) { int len=strlen(s); int sum=...
分类:
其他好文 时间:
2014-08-06 22:02:22
阅读次数:
209
Atitit.提升软件稳定性---基于数据库实现的持久化 循环队列 环形队列
1. 前言::选型(马)
1
2. 实现java.util.queue接口 1
3. 当前指针的2个实现方式 1
1.1. 用一个游标last 来指示 (指针表字段last ),麻烦的,不推荐
1
1.2. (简单,推荐)使用循环次数来指示,每循环加1 (字段cirTimes),order ...
分类:
数据库 时间:
2014-08-05 22:46:50
阅读次数:
375
HDU 2222 题意:给出N(N#include #include using namespace std;#define N 500005char str[1000005];struct AC{ int ch[N][26],fail[N],val[N],last[N],tmp,root; ...
分类:
其他好文 时间:
2014-08-05 18:39:09
阅读次数:
246
堆栈1,概要堆栈是两种数据结构。堆栈都是一种数据项按序排列的的数据结构,只能在一端进行(称为栈顶(top))对数据项进行插入和删除。要点:堆,列队优先,先进先出。栈,后进先出(Last-In/First-Out)。2,对比(Java语言)1.栈(stack)和堆(heap)都是java用来在Ram中...
分类:
编程语言 时间:
2014-08-05 18:24:29
阅读次数:
358
数组开小了,还是小了很多,注意数组里的是节点总数!#include#include#include#include#include#define maxn 500000+10using namespace std;int ch[maxn][26],fail[maxn],last[maxn],val[...
分类:
其他好文 时间:
2014-08-05 15:36:39
阅读次数:
175
Welcome back to what’s going to be the last “official” part of this series – I’ll do more GPU-related posts in the future, but this series is long eno...
分类:
其他好文 时间:
2014-08-05 02:56:18
阅读次数:
427
Welcome back. Last part was about vertex shaders, with some coverage of GPU shader units in general. Mostly, they’re just vector processors, but the.....
分类:
其他好文 时间:
2014-08-05 00:35:28
阅读次数:
288
After the last post about texture samplers, we’re now back in the 3D frontend. We’re done with vertex shading, so now we can start actually renderi...
分类:
其他好文 时间:
2014-08-05 00:35:18
阅读次数:
306
In this installment, I’ll be talking about the (early) Z pipeline and how it interacts with rasterization. Like the last part, the text won’t procee.....
分类:
其他好文 时间:
2014-08-05 00:34:50
阅读次数:
360