
数据结构
dazhi_100
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HASH函数及解决冲突的几种方法
最常用的3个HASH函数:1. 除法散列法:通过取k除以m的余数,来将关键字k映射到m个槽的某一个中去,即散列函数为: h(k) = k mod m2. 乘法散列法:首先,用关键字k乘上常数A(0 h(k) = ⌊m(kA mod 1)⌋3.全域散列法(universal hashing) 解决冲突常用的两种方法:1. 链接法(cha转载 2012-02-18 11:20:14 · 960 阅读 · 0 评论 -
next_permutation()函数实现全排序
#include #include #include void func(const char *str_in) { std::string str(str_in); std::sort(str.begin(),str.end()); std::cout do {转载 2012-07-02 15:33:35 · 669 阅读 · 0 评论 -
next_permutation()实现全排序
#include #include #include void func(const char *str_in) { std::string str(str_in); std::sort(str.begin(),str.end()); std::cout do {转载 2012-07-02 15:34:14 · 517 阅读 · 0 评论