![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
LookIn
这个作者很懒,什么都没留下…
展开
-
Bitonic Sort(双调排序)
#include #include using namespace std; class bitonic_sorter{ public: bitonic_sorter(int a[], int len); void sort(bool dir=true); void sort_for_arbitray_length(bool di原创 2012-08-29 00:03:18 · 6792 阅读 · 0 评论 -
插入法排序
#include#include#includeusing namespace std;templatevoid insertion_sort(const Iterator& begin,const Iterator& end){ Iterator key,insertion_point; for(key=begin+1;key<end;key++){ insertion_po原创 2012-08-31 08:47:57 · 636 阅读 · 0 评论 -
产生[low,up)中m个不同的随机数,m<=up-low
#include#include#includeusing namespace std;//产生[low,up)中m个不同的随机数,m<=up-lowvoid getMrandum(int result[],int low,int up,int m){ int len=up-low; int* randsource=new int[len]; for(int i=0;i<up-原创 2012-08-26 15:53:59 · 1975 阅读 · 0 评论 -
打印图的2-连通分支
打印图的2-连通分支 (注:部分定义、图像参考中科院陈玉福《计算机算法设计与分析》讲义)2-连通图的定义: 如果无向连通图G中的任两个顶点都有两条不相交的路径相连通,连通图G称为2-连通的。割点的定义: 无向连通图G中的顶点v称为割点,如果在G中去掉v及其关联的边,剩下的图就不再连通。如下图中,F、C、G为割点。2-连通分支的定义:由割点原创 2012-09-22 02:23:23 · 4692 阅读 · 0 评论 -
霍夫曼编码(Huffman Coding)
霍夫曼编码(Huffman Coding)是一种编码方式,是一种用于无损数据压缩的熵编码(权编码)算法。1952年,David A. Huffman在麻省理工攻读博士时所发明的,并发表于《一种构建极小多余编码的方法》(A Method for the Construction of Minimum-Redundancy Codes)一文。在计算机数据处理中,霍夫曼编码使用变长编码表原创 2012-10-15 02:19:09 · 16679 阅读 · 0 评论