what if i have asked to find the minimum water here.
i am able to use same technique here .?
if i got two same height
i am changing the right part in else part
what if i am given smaller value after that in left part.?
do same approach will work fine .?