Facebook
From Mature Cat, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 188
  1.  public static void PreOrder(Węzeł<T> root)
  2.         {
  3.             if (root == null) return;
  4.  
  5.             Console.WriteLine("Wypisz PreOrder" + root.wartość);
  6.             PreOrder(root.lewe);
  7.             PreOrder(root.prawe);
  8.         }
  9.  
  10.         public static void InOrder(Węzeł<T> root)
  11.         {
  12.             if (root == null) return;
  13.  
  14.             InOrder(root.lewe);
  15.             Console.WriteLine("Wypisz InOrder " + root.wartość);
  16.             InOrder(root.prawe);
  17.         }
  18.  
  19.         public static void PostOrder(Węzeł<T> root)
  20.         {
  21.             if (root == null) return;
  22.  
  23.             PostOrder(root.lewe);
  24.             PostOrder(root.prawe);
  25.             Console.WriteLine("Wypisz PostOrder" + root.wartość);
  26.         }