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

Now can start to implement the operations that we'll want to perform on BSTs. Here's the outline of the functions we'll implement. We use the generic table insertion convenience functions from Exercise 2.8-3 to implement bst_insert() and bst_replace(), as well the generic assertion function implementations from Exercise 2.9-2 to implement tbl_assert_insert() and tbl_assert_delete(). We also include a copy of the default memory allocation functions for use with BSTs:

30. <BST operations 30> =
<BST creation function 31>
<BST search function 32>
<BST item insertion function 33>
<Table insertion convenience functions; tbl => bst 594>
<BST item deletion function 38>
<BST traversal functions 64>
<BST copy function 84>
<BST destruction function 85>
<BST balance function 88>
<Default memory allocation functions; tbl => bst 7>
<Table assertion functions; tbl => bst 596>

This code is included in 26.