Your question is Maximize Container Capacity with Limited Heights. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given an array of integers representing the heights of vertical containers, calculate the maximum amount of water that can be contained between them. The water can only be trapped if there are taller containers on both sides. The width of each container is 1.
def max_area(heights: list[int]) -> int: