Exemplo n.º 1
0
 public void CreateTree()
 {
     rootchar                  = new TreeNodeChar('P');
     rootchar.left             = new TreeNodeChar('A');
     rootchar.left.left        = new TreeNodeChar('S');
     rootchar.left.right       = new TreeNodeChar('E');
     rootchar.left.left.left   = new TreeNodeChar('T');
     rootchar.left.left.right  = new TreeNodeChar('Q');
     rootchar.left.right.left  = new TreeNodeChar('D');
     rootchar.right            = new TreeNodeChar('X');
     rootchar.right.left       = new TreeNodeChar('M');
     rootchar.right.right      = new TreeNodeChar('R');
     rootchar.right.right.left = new TreeNodeChar('C');
 }
Exemplo n.º 2
0
 public BinarySearchTree()
 {
     rootchar = null;
     rootInt  = null;
 }
Exemplo n.º 3
0
 public TreeNodeChar(char ch)
 {
     info  = ch;
     left  = null;
     right = null;
 }