Previous slide Next slide Back to the first slide View text version


Notes:

Now, imagine that what we really want is a phone-book structure. In other words, all of our records are pairs of names and phone numbers. Such a structure needs to be organized for quick access by name, so the natural choice would be to impose a binary tree data structure on the “name” fields of its records. This is easily accomplished by adding a “tree” layer (in reality a red-black tree) to our composition.