Binary Search Tree Hacker Rank Solution
def getHeight(self,root):
if root is None:
return -1
else:
return 1+max(self.getHeight(root.left),self.getHeight(root.right))
if root is None:
return -1
else:
return 1+max(self.getHeight(root.left),self.getHeight(root.right))
Comments
Post a Comment