
Given a list of non-negative integers heights representing the heights of a set of bars with unit width, find the maximum area of water that can be trapped between any two bars. The area of water between two bars i and j is calculated as the product of the minimum height between heights[i] and heights[j] and the distance j - i.
Access the full code editor, ThinkBuddy AI hints, and track your progress.