5.3 Operations [ToC] [Index]     [Skip Back] [Skip Fwd]     [Prev] [Up] [Next]

Now we'll implement for AVL trees all the operations that we did for BSTs. Here's the outline. Creation and search of AVL trees is exactly like that for plain BSTs, and the generic table functions for insertion convenience, assertion, and memory allocation are still relevant, so we just reuse the code. Of the remaining functions, we will write new implementations of the insertion and deletion functions and revise the traversal and copy functions.

145. <AVL functions 145> =
<BST creation function; bst => avl 30>
<BST search function; bst => avl 31>
<AVL item insertion function 146>
<Table insertion convenience functions; tbl => avl 592>
<AVL item deletion function 164>
<AVL traversal functions 178>
<AVL copy function 185>
<BST destruction function; bst => avl 84>
<Default memory allocation functions; tbl => avl 6>
<Table assertion functions; tbl => avl 594>

This code is included in 143.