edu.princeton.cs.algs4.growingtree.interfaces
Interface IInsertOperator<P extends NodeProperties>

Type Parameters:
P -
All Known Implementing Classes:
AVLInsertion, BSTInsertion, LLRBInsertion, RandomizedBSTInsertion, RankInsertion, RedBlackInsertion, SplayOperators.SplayInsertion

public interface IInsertOperator<P extends NodeProperties>

This must be implemented by classes in order to define a insert operator.

Author:
Josh Israel

Method Summary
 void doInsert(IInsertingNode<P> root, INode<P> newNode)
           
 

Method Detail

doInsert

void doInsert(IInsertingNode<P> root,
              INode<P> newNode)
Parameters:
root - Root of the tree
newNode - Node to be inserted into the tree. Null when inserting into an empty tree.