Tree Data Structures (cont)
Binary trees (k=2 children per node) can be defined recursively, as follows:
A binary tree is either
- empty (contains no nodes)
- consists of a node, with two subtrees
- node contains a value
- left and right subtrees are binary trees
|