What if the container can be trapezoid?


  • 0
    S

    The problem doesn't mention at all that the container should be rectangle. Only after I see the posted solution did I realize that. Before that I thought the container could be a trapezoid, bounded by two lines of different heights and the x axis.

    But what if the problem is modified such that the container can actually be a trapezoid? Is it possible to find maxArea in O(n) time, too? Any idea is appreciated!


Log in to reply
 

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