"I think that I shall never see
A poem as lovely as a tree." - Joyce Kilmer
In this chapter you will learn about the concept of a tree as they are known in Computer Science. While we will not be writing poems about them, we will construct some lovely code to provide efficient implementations of some Abstract Data Type (ADT).
Chapter 25 introduced the concept of the linked structure using the simplest form of a linked list. The most general expression of a linked structure is the graph that was briefly presented in chapter 28. A tree is a linked structure that falls somewhere between these two extremes. Like the other two, a tree is formed of nodes with edges between them. We consider these edges to have a direction, ...