https://onlinegdb.com/5ZO246b5v

why this code shows tle?

hi @hittasehgal
image
here was the error… in outer for loop u have to do x++, while u are doing sx++ and in inner for loop instead of y++ u are doing sy++

corrected code -->


It’s working fine and passing all test cases now…

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.