background image

Test.cpp............................................................................................................................................................................................................................................................................83

9、优先级队列.......................................................................................................................................................................................................................................................................85

QueueNode.h...................................................................................................................................................................................................................................................................85
Compare.h.......................................................................................................................................................................................................................................................................86
PriorityQueue.h...............................................................................................................................................................................................................................................................88
Test.cpp............................................................................................................................................................................................................................................................................94

10、串.....................................................................................................................................................................................................................................................................................97

MyString.h.......................................................................................................................................................................................................................................................................97
MyString.cpp.................................................................................................................................................................................................................................................................100
test.cpp...........................................................................................................................................................................................................................................................................114

11、二叉树...........................................................................................................................................................................................................................................................................117

BinTreeNode.h...............................................................................................................................................................................................................................................................117
BinaryTree.h..................................................................................................................................................................................................................................................................125
Test.cpp..........................................................................................................................................................................................................................................................................138

12、线索二叉树...................................................................................................................................................................................................................................................................141

ThreadNode.h................................................................................................................................................................................................................................................................141
ThreadTree.h..................................................................................................................................................................................................................................................................143
ThreadInorderIterator.h.................................................................................................................................................................................................................................................143
test.cpp...........................................................................................................................................................................................................................................................................155

13、堆...................................................................................................................................................................................................................................................................................157

MinHeap.h.....................................................................................................................................................................................................................................................................157
test.cpp...........................................................................................................................................................................................................................................................................165

14、哈夫曼树.......................................................................................................................................................................................................................................................................166

BinTreeNode.h..............................................................................................................................................................................................................................................................166
BinaryTree.h..................................................................................................................................................................................................................................................................169
MinHeap.h.....................................................................................................................................................................................................................................................................174
Huffman.h......................................................................................................................................................................................................................................................................180
Test.cpp..........................................................................................................................................................................................................................................................................182

15、树...................................................................................................................................................................................................................................................................................183

QueueNode.h.................................................................................................................................................................................................................................................................183
LinkQueue.h..................................................................................................................................................................................................................................................................184
TreeNode.h....................................................................................................................................................................................................................................................................189
Tree.h.............................................................................................................................................................................................................................................................................190
test.cpp...........................................................................................................................................................................................................................................................................208