Advertisement
Guest User

Untitled

a guest
May 26th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public int wysokość(Węzeł w)
  2.     {
  3.         if (w == null)
  4.         {
  5.             return -1;
  6.         }
  7.         int lewy = wysokość(w.lewy);
  8.         int prawy = wysokość(w.prawy);
  9.         if(lewy > prawy)
  10.         {
  11.             return lewy + 1;
  12.         }
  13.         else
  14.         {
  15.             return prawy + 1;
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement