Two pointersMedium
Container With Most Water
Each number in height is the height of a bar standing one step from the next. Pick two bars so that, with the floor between them, they hold the most water, and return that amount.
Two pointersMedium
Each number in height is the height of a bar standing one step from the next. Pick two bars so that, with the floor between them, they hold the most water, and return that amount.