304Chapter 9Abstract Data Types and AlgorithmsFigure 9.17Two varia-tions of a binary treeEABCDHIJEFGAFBGDICHJtreetree(a) A 4-level tree(b) A 10-level tree15tree81016171821197651Figure 9.18A binary search treesimilarity of this approach to our binary search of a linear structure. Weeliminate a large portion of the data with one comparison.Next we compare 18 with 17, the value in the root of the right subtree.
This is the end of the preview.
access the rest of the document.
abstract data types, right subtree, 15 7 5 8 6 10 16 18 17 19 21