Search⌘ K
AI Features

Container with Most Water

Container with Most Water gives an array of line heights. Choose two lines to form a vertical-sided container with the x-axis, then return the greatest amount of water it can hold.

Statement

You’re given an integer array height of length ...