Function to find the height of the given tree
def height ( root ) : NEW_LINE INDENT ht = 0 NEW_LINE if ( root == None ) : NEW_LINE INDENT return 0 NEW_LINE DEDENT return ( max ( height ( root . left ) , height ( root . right ) ) + 1 ) NEW_LINE DEDENT