1/11
Looks like no tags are added yet.
Tree
A hierarchical data structure made of nodes connected by parent-child relationships.
Root
The topmost node of a tree hierarchy.
Leaf
A node that has no children.
Size (tree)
The total number of nodes contained within a tree.
Depth (node)
The number of connections along the path from the root to a given node.
Height (tree)
The maximum number of connections on a path from the root to any leaf.
Arity
The maximum number of children that any single node may have.
Binary tree
A tree structure where each node can have at most two children.
Standard binary-tree node references
A left-child reference and a right-child reference.
Linked-node representation (binary tree)
A design where each node stores its value alongside references to its left and right subtrees.
Purpose of an abstract binary-tree class
To define shared behavior while delegating specific operations, like left and right subtree access, to subclasses.
Construction of an immutable binary tree
Creating leaf nodes first, then assembling them bottom-up into parent nodes and larger subtrees.