Function to find the max height or the number of lines in the triangle pattern
def maxHeight ( n ) : NEW_LINE INDENT ans = ( sqrt ( 1 + 8.0 * n ) - 1 ) // 2 ; NEW_LINE return int ( ans ) ; NEW_LINE DEDENT