CMSC 202 Lecture Notes: Trees

These notes discuss trees in general, not just binary trees.


Some basic terminology for trees:

The tree T, constructed using k subtrees

More terminology

Paths and Levels

A general tree, showing node depths (levels)

In the example above:

Binary Trees

Examples of Binary Trees

A Binary Tree. As usual, the empty children are not explicitly shown.

A Full Binary Tree. In a FBT, the number of nodes at level i is 2i.

A Complete Binary Tree.

Not a Complete Binary Tree. The tree above is not a CBT because the deepest level is not filled from left-to-right.

Thomas A. Anastasio, Tue Oct 28 11:01:25 EST 1997

Modified some by Richard Chang, Tue Apr 28 12:43:27 EDT 1998.