- 博客(5)
- 收藏
- 关注
原创 二叉搜索树的c++实现(含深复制)
本文参考了《数据结构与算法分析C++描述(第3版)》[美] Mark Weiss 著 张怀勇 等译 刘田 审校binarynode.h:struct binarynode{ int element; binarynode * left; binarynode * right; binarynode(int e,binarynode* l,binary
2015-09-05 23:39:36 727
原创 探测法的哈希表的C++实现(最新修改)
本文参考了《数据结构与算法分析C++描述(第3版)》[美] Mark Weiss 著 张怀勇 等译 刘田 审校#include#includeusing namespace std;template class hashtable{ private: vectordatatable;//储存元素的数组 vectortypetable;//储存键对应状
2015-07-14 23:20:30 512
原创 分离链表法哈希表的C++实现(最新修改)
本文参考了《数据结构与算法分析C++描述(第3版)》[美] Mark Weiss 著 张怀勇 等译 刘田 审校#include#include#includeusing namespace std;template class HashTable{ private: vector >theLists; int myhash(T x)//对不同类型的
2015-07-14 13:21:44 658
原创 跳跃表(Skip List)的实现及测试 C++实现
//skipnode.h头文件:#includeusing namespace std;struct skipnode//表示一个结点的结构体{ int data;//元素的值 int level;//层数 vectorp;//存结点指针的数组 skipnode(int datain=0,int levelin=1){//构造函数 setnode(datain,levelin);
2015-07-06 09:42:42 2872
原创 八大排序算法的C++实现
#include#include#include using namespace std;void print(vector numv){//输出数组int size=numv.size();if(size==0)coutelse{for(int i=1;icout}cout}}vector insertionsort(vector nu
2015-07-06 09:06:13 437
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人