示例#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;
 }