O(n) solution for max container for water.