public TreeIterator(BinaryTree <T> theTree)
 {
     t       = theTree;
     current = null;
 }
 public void setLeft(BinaryNode <T> node)
 {
     _left = node;
 }
 public void setRight(BinaryNode <T> node)
 {
     _right = node;
 }
예제 #4
0
 public void makeEmpty()
 {
     Root = null;
 }
 public BinaryNode(T element, BinaryNode <T> lt, BinaryNode <T> rt)
 {
     _element = element;
     _left    = lt;
     _right   = rt;
 }
예제 #6
0
 public int size()
 {
     return(BinaryNode <T> .size(Root));
 }
예제 #7
0
 public int height()
 {
     return(BinaryNode <T> .height(Root));
 }
예제 #8
0
 public BinaryTree(T rootItem)
 {
     Root = new BinaryNode <T>(rootItem);
 }
예제 #9
0
 public BinaryTree()
 {
     Root = null;
 }
예제 #10
0
 public void RemoveMin()
 {
     Root = RemoveMin(Root);
 }
예제 #11
0
 public void Remove(T x)
 {
     Root = Remove(x, Root);
 }
예제 #12
0
 public void Insert(T x)
 {
     Root = Insert(x, Root);
 }