Guest User

Untitled

a guest
May 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. int globi, globmax;
  2.  
  3. int hloubkaStromu(Uzel * root) {
  4. if (root->levy != NULL) {
  5. globi++;
  6. if (globi>globmax) {globmax=globi;}
  7. hloubkaStromu(root->levy);
  8. }
  9. if (root->pravy != NULL) {
  10. globi++;
  11. if (globi>globmax) {globmax=globi;}
  12. hloubkaStromu(root->pravy);
  13. }
  14. globi--;
  15. return globmax;
  16. }
Add Comment
Please, Sign In to add comment