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

Common operations


Tree data structures can consistent of 1...n nodes., which means that even a single node without a parent or any children is still considered a tree. Therefore, many of the common operations associated with trees can be defined in terms of a single node, or from the perspective of the same. Here is a list of the most common operations associated with trees

  • Data: The data operation is associated with a single node, and returns the object or value contained in that node.

  • Children: The children operation returns the collection of siblings associated with this parent node.

  • Parent: Some tree structures provide a mechanism to "climb" the tree, or traverse the structure from any particular node back toward the root.

  • Enumerate: An enumeration operation will return a list or some other collection containing every descendant of a particular node, including the root node itself.

  • Insert: An insert operation allows a new node to be added as a child of an existing node in the tree. The insert...