19. Custom Templatized Data Structures
‘Will you walk a little faster?’ said a whiting to a snail, ‘There’s a porpoise close behind us, and he’s treading on my tail.’
There is always room at the top.
Push on—keep moving.
I’ll turn over a new leaf.
—Miguel de Cervantes
In this chapter you’ll:
• Form linked data structures using pointers, self-referential classes and recursion.
• Create and manipulate dynamic data structures such as linked lists, queues, stacks and binary trees.
• Use binary search trees for high-speed searching and sorting.
• Learn important applications of linked data structures.
• Create reusable data structures with class templates, inheritance and composition.