You are viewing a single comment's thread. Return to all comments →
Why have you added 1 in leftHeight = 1 + height(root.left); and rightHeight = 1 + height(root.right);
Seems like cookies are disabled on this browser, please enable them to open this website
Tree: Height of a Binary Tree
You are viewing a single comment's thread. Return to all comments →
Why have you added 1 in leftHeight = 1 + height(root.left); and rightHeight = 1 + height(root.right);