Contents v
4.1.4 Element Implementations 114
4.1.5 Doubly Linked Lists 115
4.2 Stacks 120
4.2.1 Array-Based Stacks 121
4.2.2 Linked Stacks 124
4.2.3 Comparison of Array-Based and Linked Stacks 125
4.2.4 Implementing Recursion 125
4.3 Queues 129
4.3.1 Array-Based Queues 129
4.3.2 Linked Queues 134
4.3.3 Comparison of Array-Based and Linked Queues 134
4.4 Dictionaries 134
4.5 Further Reading 145
4.6 Exercises 145
4.7 Projects 149
5 Binary Trees 151
5.1 Definitions and Properties 151
5.1.1 The Full Binary Tree Theorem 153
5.1.2 A Binary Tree Node ADT 155
5.2 Binary Tree Traversals 155
5.3 Binary Tree Node Implementations 160
5.3.1 Pointer-Based Node Implementations 160
5.3.2 Space Requirements 166
5.3.3 Array Implementation for Complete Binary Trees 168
5.4 Binary Search Trees 168
5.5 Heaps and Priority Queues 178
5.6 Huffman Coding Trees 185
5.6.1 Building Huffman Coding Trees 186
5.6.2 Assigning and Using Huffman Codes 192
5.6.3 Search in Huffman Trees 195
5.7 Further Reading 196
5.8 Exercises 196
5.9 Projects 200
6 Non-Binary Trees 203
评论0
最新资源