Tree Structure
- Vector indices carry tree structure
- Index order = levelorder (beginning with 0)
- Tree structure is implicit
- Uses integer arithmetic for tree navigation
|
Tree Navigation
- Parent of v[k] = v[(k-1)/2]
- Left child of v[k] = v[2*k+1]
- Right child of v[k] = v[2*k+2]
|