Tree: Height of a Binary Tree

  • + 0 comments

    The height of a binary tree with no children is 0. If you are returning -1 in this case, that only works if you also have somewhere that adds +1 so the final return value becomes 0.