예제 #1
0
 public void MakeEmpty()
 {
     Root = null;
 }
예제 #2
0
 public BinaryTree(T value)
 {
     Root = new BinaryNode <T>(value);
 }
예제 #3
0
 public BinaryNode <T> AddRightChild(T value)
 {
     RightChild = new BinaryNode <T>(value);
     return(RightChild);
 }
예제 #4
0
 public BinaryNode <T> AddLeftChild(T value)
 {
     LeftChild = new BinaryNode <T>(value);
     return(LeftChild);
 }
예제 #5
0
 public BinaryNode(T value, BinaryNode <T> leftChild, BinaryNode <T> rightChild)
 {
     Value      = value;
     LeftChild  = leftChild;
     RightChild = rightChild;
 }
예제 #6
0
 public BinaryNode(T value)
 {
     Value      = value;
     LeftChild  = null;
     RightChild = null;
 }