Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

withdraw Method

Program gif gives the code for the withdraw method of the BinarySearchTree class. The withdraw method takes as its argument the object instance to be removed from the tree. The algorithm first determines the location of the object to be removed and then removes it according to the procedure described above.

   program19222
Program: BinarySearchTree class withdraw method.


next up previous index

Bruno Copyright © 2003, 2004 by Bruno R. Preiss, P.Eng. All rights reserved.