edu.princeton.cs.algs4.growingtree.demos
Class BSTInsertion<P extends NodeProperties>

java.lang.Object
  extended by edu.princeton.cs.algs4.growingtree.demos.BSTInsertion<P>
All Implemented Interfaces:
IInsertOperator<P>
Direct Known Subclasses:
RankInsertion, SplayOperators.SplayInsertion

public class BSTInsertion<P extends NodeProperties>
extends java.lang.Object
implements IInsertOperator<P>


Constructor Summary
BSTInsertion()
           
 
Method Summary
 void doInsert(IInsertingNode<P> root, INode<P> newNode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BSTInsertion

public BSTInsertion()
Method Detail

doInsert

public void doInsert(IInsertingNode<P> root,
                     INode<P> newNode)
Specified by:
doInsert in interface IInsertOperator<P extends NodeProperties>
Parameters:
root - Root of the tree
newNode - Node to be inserted into the tree. Null when inserting into an empty tree.