Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ...
分类:
其他好文 时间:
2014-12-10 01:44:20
阅读次数:
333
STL源码剖析---关联容器
标准关联容器分为set和map两大类,包括multiset和multimap,这些容器的底层机制都是RB-tree.标准之外的关联容器有hashtable 以及以此hash table为底层机制而完成的hash_set(散列集合) hash_map(散列映射表) hash_multiset hash_multimap.
序列和关联容器各自的内部...
分类:
其他好文 时间:
2014-12-09 23:11:43
阅读次数:
465
水题==代码:#include #include #include using namespace std;const int mod = 10005;struct Node { int to, next;}e[1000005];int head[mod + 10];int tot;int a...
分类:
其他好文 时间:
2014-12-09 22:55:01
阅读次数:
268
querycache原理当mysql接收到一条select类型的query时,mysql会对这条query进行hash计算而得到一个hash值,然后通过该hash值到querycache中去匹配,如果没有匹配中,则将这个hash值存放在一个hash链表中,同时将query的结果集存放进cache中,存放hash值的链表的每一个hash节点..
分类:
数据库 时间:
2014-12-09 19:57:20
阅读次数:
223
1、compatMode怪异模式 CSS1Compat遵循 BackCompat已触发怪异模式
2、document.location.port 80不返回
3、通过设置document.location.hash实现跳转
4、replace assign document.location.replace会讲当前文档从历史中清除
5、document.readyState loading(浏览器正在加载) interactive(除图片等媒体文件已加载完成) complete(所有资源已加载完成)...
分类:
Web程序 时间:
2014-12-09 17:51:58
阅读次数:
219
消息摘要算法又成散列算法,其核心在于散列函数的单向性。即通过散列函数可获得对应的散列值,但不可以通过散列值反推其原始信息。消息摘要算法分为以下三大类: MD(Message Digest ,消息摘要) SHA(Secure Hash Algorithm ,安全散列算法) MAC(Mess...
分类:
编程语言 时间:
2014-12-09 13:53:07
阅读次数:
252
TIANKENG’s restaurant(Ⅱ)Time Limit: 16000/8000 MS (Java/Others)Memory Limit: 130107/65536 K (Java/Others)Total Submission(s): 466Accepted Submission(s...
分类:
其他好文 时间:
2014-12-09 12:12:15
阅读次数:
249
Java 5.0 adds ConcurrentHashMap, a replacement for synchronized hash-based Map implementations, and CopyOnWriteArrayList, a replacement for synchroniz...
分类:
编程语言 时间:
2014-12-09 00:24:05
阅读次数:
192
STL源码剖析—序列容器
对于STL中的容器,存在一定的内含关系,例如,heap内含一个vector,priority-queue内含一个hep,stack和queue都含有一个deque,set/map/multiset/multimap都内含一个RB-tree,hash_x都内含一个hashtable。
对于序列容器来说,vector和list的插入都是在指向迭代器之前进...
分类:
其他好文 时间:
2014-12-08 23:03:18
阅读次数:
273
- (NSString *)MD5
{
const
char *cStr = [self
UTF8String];
unsigned
char result[16];
CC_MD5(cStr,
strlen(cStr), result);
return [NSString
stringWithFormat:
@"%02X%02X%02X%02X%02X%02X%02X...
分类:
其他好文 时间:
2014-12-08 17:45:12
阅读次数:
153