Project 3 Notes


The following notes pertain to Project 3

  1. The BST::Delete(T & item) method has a bug. It crashes when attempting to delete the root element. Here is a rewrite of the method that does not have that problem. It is basically the same method, but when the node to be deleted is the root, it is given a "fake parent" and is made the left-child of that fake parent. This keeps expressions of the form v->parent from being NULL.
    Click here for the code.