17
Rebalancing Trees
(cont)
New operation on trees:
partition(tree,i)
: re-arrange tree so that element with index
i
becomes root
For tree with
N
nodes, indices are
0 .. N-1