Ejemplo n.º 1
0
 public void InOrder(BinarisKeresofaNode <T, K> root)
 {
     if (root != null)
     {
         InOrder(root.Bal);
         Console.WriteLine(root.Value);
         InOrder(root.Jobb);
     }
 }
Ejemplo n.º 2
0
 public void Beszur(BinarisKeresofaNode <T, K> ujtag)
 {
     if (root == null)
     {
         root = ujtag;
     }
     else
     {
         Beszur(this.root, ujtag);
     }
 }
Ejemplo n.º 3
0
 public void Beszur(BinarisKeresofaNode <T, K> root, BinarisKeresofaNode <T, K> ujtag)
 {
     if (root == null)
     {
         root = ujtag;
     }
     else if (0 > root.CompareTo(ujtag))
     {
         Beszur(root.Bal, ujtag);
     }
     else
     {
         Beszur(root.Jobb, ujtag);
     }
 }
Ejemplo n.º 4
0
 public int CompareTo(BinarisKeresofaNode <T, K> other)
 {
     return(this.Comparator.CompareTo(other.Comparator));
 }