Finding height in Binary Search Tree
The problem lies in your base case. “The height of a tree is the length of the path from the root to the deepest node in the tree. A (rooted) tree with only a node (the root) has a height of zero.” – Wikipedia If there is no node, you want to return -1 not … Read more