Tree: Height of a Binary Tree

  • + 3 comments

    Sorry, have'nt seen your reply such a long time:

    static int height(Node root) {
          	if(root == null)
                return 0;
                
                //some code then
    

    My code returns 0 when root is NULL and I had no problems with it. Maybe it was fixed later.