1 20 50 150 500 专题1 专题20 专题40 专题60
欢迎来到存起来软件站,找素材,搜软件,就上存起来软件站!
当前位置 >首页 >软件下载 >电脑软件 >编程开发 >源码相关

用C++实现数据结构中的各种算法代码实例

软件信息
  • 大小:66KB
  • 语言: 中文
  • 环境: WinXP, WinAll
  • 更新:2024-11-13
  • 评级:
  • 系统: Windows Linux Mac Ubuntu
  • 软件类别: 国产软件 / 免费软件 / 源码相关
  • 插件情况:

用C++实现数据结构中的一下算法:
目 录 1
1、顺序表 1
Seqlist.h 1
Test.cpp 4
2、 单链表 5
ListNode.h 5
SingleList.h 6
test.cpp 12
3、 双向循环链表 13
NodeList.h 13
DoubleList.h 14
Test.cpp 20
4、 单项循环链表 21
ListNode.h 21
CircularList.h 22
Test.cpp 28
5、 顺序栈 29
SeqStack.h 29
Test.cpp 32
6、 链式栈 33
StackNode.h 33
LinkStack.h 33
Test.cpp 36
7.顺序队列 37
SeqQueue.h 37
Test.cpp 40
8、链式队列 41
QueueNode.h 41
LinkQueue.h 42
Test.cpp 44
9、优先级队列 45
QueueNode.h 46
Compare.h 46
PriorityQueue.h 47
Test.cpp 51
10、串 52
MyString.h 52
MyString.cpp 54
test.cpp 60
11、二叉树 61
BinTreeNode.h 62
BinaryTree.h 66
Test.cpp 73
12、线索二叉树 74
ThreadNode.h 74
ThreadTree.h 75
ThreadInorderIterator.h 76
test.cpp 82
13、堆 83
MinHeap.h 83
test.cpp 87
14、哈夫曼树 88
BinTreeNode.h 88
BinaryTree.h 89
MinHeap.h 92
Huffman.h 95
Test.cpp 96
15、树 97
QueueNode.h 97
LinkQueue.h 97
TreeNode.h 100
Tree.h 100
test.cpp 110
16、B+树 111
BTreeNode.h 111
BTree.h 113
test.cpp 126
17、图 127
MinHeap.h 127
Edge.h 130
Vertex.h 131
Graph.h 132
test.cpp 144
18、排序 145
Data.h 146
QueueNode.h 149
LinkQueue.h 152
Sort.h 154
test.cpp 162
1、顺序表

Seqlist.h

const int DefaultSize=100;

template <typename Type>
class SeqList{
public:
SeqList(int sz=DefaultSize)
:m_nmaxsize(sz),m_ncurrentsize(-1){
if(sz>0){
m_elements=new Type[m_nmaxsize];
}
}
 

未经书面许可,严禁将本网内容作为AI训练资源。

下载地址

热门软件

Top