Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents 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.

   program19081
Program: BinarySearchTree class withdraw method.


next up previous contents index

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