You are viewing a single comment's thread. Return to all 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.
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
Sorry, have'nt seen your reply such a long time:
My code returns 0 when root is NULL and I had no problems with it. Maybe it was fixed later.