题目:

题解:
func maxArea(height []int) int {
    res := 0
    L := 0
    R := len(height) - 1
    for L < R {
        tmp := math.Min(float64(height[L]), float64(height[R]))
        res = int(math.Max(float64(res), tmp * float64((R - L))))
        if height[L] < height[R] {
            L++
        } else {
            R--
        }
    }
    return res
}


















