Container with most water
Asked in the Technical Round 1 stage.
Given an array height, where height[i] is the height of a vertical line at position i, return the maximum water area formed by any two lines. The area is min(height[i], height[j]) * (j - i).
Function: def max_area(height):
Input: a list of non-negative integers. Output: an integer.
Example: [1,8,6,2,5,4,8,3,7] returns 49. [1,1] returns 1.
def max_area(height):