June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Linked lists, stacks and queues are linear data structures (i.e., sequence). A tree is a nonlinear, two-dimensional data structure with special properties. Tree nodes contain two or more links.
We now discuss binary trees (Fig. 24.18)—trees whose nodes all contain two links (none, one or both of which may be Nothing). The root node is the first node in a tree. Each link in the root node refers to a child. The left child is the first node in the left subtree, and the right child is the first node in the right subtree. The children of a specific node are called siblings. A node with no children is called a leaf node. Computer scientists normally draw trees from the root node down—exactly the opposite of the way ...
Read now
Unlock full access