12

TREES

For processing dynamic lists it has been seen that the linked-list data structure is very useful. It imposes a structure where an element may have a predecessor and a successor. But many natural applications require data structures, which gives the flavour of a hierarchy. This hierarchical nature is not available in the linked data structure that we have studied earlier. However, the data structure, the tree, imposes a hierarchical structure on a collection of elements. In this chapter we will consider trees together with the operations on them and their applications.

12.1 FUNDAMENTAL TERMINOLOGIES

A tree consists of a finite collection of elements called nodes or vertices, one of which is distinguished as root, and a finite collection ...

Get Data Structures Using C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.