Chapter 9. Trees: Non-Linear Structures

Tree  structures are essentially collections of nodes, typically including constraints that prevent more than one reference to each node, and stipulate that no references point to the root node. This structure simulates a hierarchical tree-like structure that can be either ordered or unordered based on the value contained in each node. Also, nodes can contain either value types or instances of objects, depending on the purpose of the tree.

Trees are incredibly useful data structures in programming, although their applications can be somewhat limited. Even when a structure is in use, you may not always recognize their presence since many other data structures are built on top of them. In this chapter we are ...

Get Everyday Data Structures 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.