Source of 25.33.java


  1: // Finds the node containing the largest entry in a given tree.
  2: // rootNode is the root node of the tree.
  3: // Returns the node containing the largest entry in the tree.
  4: private BinaryNode<T> findLargest(BinaryNode<T> rootNode)
  5: {
  6:    if (rootNode.hasRightChild())
  7:       rootNode = findLargest(rootNode.getRightChild());
  8: 
  9:    return rootNode;
 10: } // end findLargest
 11: // Version 4.0