[prev] [index] [next]

New Binary Search Tree ADT (cont)

// more standard tree operations
void dropTree(Tree);
void showTree(Tree);
int  TreeDepth(Tree);
int  TreeNumNodes(Tree);

// normally, internal to ADT
Link rotateR(Link);
Link rotateL(Link);
Tree rebalance(Tree);
Item *get_ith(Tree, int);
Tree partition(Tree, int);

Tree insertAtRoot(Tree, Item);
Tree insertRandom(Tree, Item);