Exemplo n.º 1
0
 public void showFolhas()
 {
     if (raiz != null)
     {
         raiz.showFolhas();
     }
 }
Exemplo n.º 2
0
 public void showFolhas()
 {
     if (esq != null)
     {
         esq.showFolhas();
     }
     if (esq == null && dir == null)
     {
         Console.WriteLine(x + " ");                             // exibe nó folha
     }
     if (dir != null)
     {
         dir.showFolhas();
     }
 }