Book Image

Everyday data structures

By : William Smith
Book Image

Everyday data structures

By: William Smith

Overview of this book

Explore a new world of data structures and their applications easily with this data structures book. Written by software expert William Smith, you?ll learn how to master basic and advanced data structure concepts. ? Fully understand data structures using Java, C and other common languages ? Work through practical examples and learn real-world applications ? Get to grips with data structure problem solving using case studies
Table of Contents (20 chapters)
Everyday Data Structures
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Data Types: Foundational Structures

Tree terminology


Many of the terms and definitions used in trees are unique to these data structures. Therefore, before we can examine tree data structures we need to take the time to learn the language.

Here are some of the most common and important terms:

  • Node: Any object or value stored in the tree represents a node. In the preceding figure, the root and all of its children and descendants are independent nodes.

  • Root: The root is the base node of the tree. Ironically, this node is typically depicted at the top of a graphic representation of the tree. Note that a root node, even if it has zero descendants, represents an entire tree by itself.

  • Parent: A parent node is any node which contains 1...n child nodes. The parent is only the parent in respect to one of its children. Also note that any parent node can have 0...n children depending on the rules associated with the tree's structure.

  • Child: Any node other than the root node is a child to one (and only one) other node. The root node of any...