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