Container with most waterHard
You're given an array of non-negative integers that represent various possible heights of a container.
Find the max area of a container, where:
- The width is the distance between the numbers in the input array
- And the height is the largest possible height on both sides of the contianer.
For example, given the heights
[3, 9, 2, 7, 4, 6], the max container area is
24, shown by the shaded area below: