You are viewing a single comment's thread. Return to all comments →
def height(root): if root is None: return -1 else: lDepth = height(root.left) rDepth = height(root.right) if(lDepth > rDepth): return lDepth + 1 else: return rDepth + 1
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 →