Using Search Trees and the Heap
Search trees enable you to look for data quickly. Chapter 5 introduces you to the
idea of a binary search, and the “Working with Trees” section of Chapter 6 helps
you understand trees to some extent. Obtaining data items, placing them in sorted
order in a tree, and then searching that tree is one of the faster ways to find
information.
A special kind of tree structure is the binary heap, which places each of the node
elements in a special order. The root node always contains the smallest value.
When viewing the branches, you see that upper-level branches are always a
CHAPTER 7
Do'stlaringiz bilan baham: |