 Data Structures and Algorithms 
with Object-Oriented Design Patterns in Java
Data Structures and Algorithms 
with Object-Oriented Design Patterns in Java 
  
  
  
  
 
The purge method for the BinaryTree class
is defined in Program  .
The purpose of the purge method is to make the tree empty.
It does this by assigning null to all the fields.
Clearly, the running time of the purge method is O(1).
.
The purpose of the purge method is to make the tree empty.
It does this by assigning null to all the fields.
Clearly, the running time of the purge method is O(1).
   
Program: BinaryTree class purge method.
 
  
  
  
  
 
 Copyright © 1998 by Bruno R. Preiss, P.Eng.  All rights reserved.
Copyright © 1998 by Bruno R. Preiss, P.Eng.  All rights reserved.