This problem itself is wrong

  • 0

    For case of [1,2,1], the solution is 2. It means the container is bounded by location 0 and 2. This means the middle highest block is leaking water.

    I think for this case the largest container can only contain 1 amount of water, and the container could be either [1,2] or [2,1], assuming no leaking.

  • 0

    LOL. I agree.

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.