my code is giving me the correct output,but only the last 3 test cases are being passed.
link:https://ide.codingblocks.com/s/194997
Rain water harvesting
Constraints:
1<=N<=10^6
@gayatri20
a) increase ur array size ( u have declared only 100 size array)
b) ur solution time complexity is O(n^2) .it will not pass all test case so try to optimise ur logic.
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.