题目:
题解:
func maxArea(height []int) int {res := 0L := 0R := len(height) - 1for 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
}