Representing Trees

There are a few ways to represent a tree T with n nodes.

One particularly flexible way is in terms of three arrays. For $0
\le i \le n-1$:

How can we test if node i is a leaf?


next up previous
Next: HEAPS Up: DYNAMIC PROBLEMS Previous: Ordered Trees