My code passes only the 1st two test cases

can you please tell what is wrong with this…
i thought i was able to identify the units that would hold water correctly but passed only 2 test cases.

Refer this video and check the approach.

which video? there isnt any link here??

https://www.youtube.com/watch?v=Uog2Jmyb3iY

got it bhaiiya thanks a lot!!