Test case failed

sir here in some test cases it is showing tle. pls guide me on how I can rectify it.

hi @sadhukhansubhajit117_efa308a4648c64df use long long and dont use 2 o(n2) it will give TLE, refer
https://www.geeksforgeeks.org/trapping-rain-water/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.