O'Reilly logo

Everyday Data Structures by William Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required