background image

  

目 录

  

目 录.........................................................................................................................................................................................................................................................................................1
1、顺序表.................................................................................................................................................................................................................................................................................1

Seqlist.h.............................................................................................................................................................................................................................................................................1
Test.cpp..............................................................................................................................................................................................................................................................................7

单链表.......................................................................................................................................................................................................................................................................................9

ListNode.h.........................................................................................................................................................................................................................................................................9
SingleList.h......................................................................................................................................................................................................................................................................11
test.cpp.............................................................................................................................................................................................................................................................................22

双向链表.................................................................................................................................................................................................................................................................................25

NodeList.h.......................................................................................................................................................................................................................................................................25
DoubleList.h....................................................................................................................................................................................................................................................................27
Test.cpp............................................................................................................................................................................................................................................................................37

循环链表.................................................................................................................................................................................................................................................................................40

ListNode.h.......................................................................................................................................................................................................................................................................40
CircularList.h...................................................................................................................................................................................................................................................................41
Test.cpp............................................................................................................................................................................................................................................................................52

顺序栈.....................................................................................................................................................................................................................................................................................55

SeqStack.h.......................................................................................................................................................................................................................................................................55
Test.cpp............................................................................................................................................................................................................................................................................60

链式栈.....................................................................................................................................................................................................................................................................................61

StackNode.h.....................................................................................................................................................................................................................................................................62
LinkStack.h......................................................................................................................................................................................................................................................................63
Test.cpp............................................................................................................................................................................................................................................................................67

7.顺序队列..............................................................................................................................................................................................................................................................................69

SeqQueue.h......................................................................................................................................................................................................................................................................69
Test.cpp............................................................................................................................................................................................................................................................................75

8、链式队列...........................................................................................................................................................................................................................................................................77

QueueNode.h...................................................................................................................................................................................................................................................................77
LinkQueue.h....................................................................................................................................................................................................................................................................78