Tree: Height of a Binary Tree

  • + 0 comments

    Why have you added 1 in leftHeight = 1 + height(root.left); and rightHeight = 1 + height(root.right);