def height(root):
    '\n    DFS\n\n    v = Vertices\n    e = Edges\n    d = Depth\n\n    Time complexity:   O(v + e)\n    Space complexity:  O(d)\n    '
    if root:
        return (1 + max(height(root.left), height(root.right)))
    else:
        return (- 1)
DFS

v = Vertices
e = Edges
d = Depth

Time complexity:   O(v + e)
Space complexity:  O(d)
def height(root):
    '\n    DFS\n\n    v = Vertices\n    e = Edges\n    d = Depth\n\n    Time complexity:   O(v + e)\n    Space complexity:  O(d)\n    '
    if root:
        return (1 + max(height(root.left), height(root.right)))
    else:
        return (- 1)