Pls check the code where is the er
hello @sneha23
in both the loops u are using n.
but the given matrix is of dimension m X n
so use n in outer loop and m in inner loop.
but the image is always in n*n by mistake i took m and n separtely editted it now by still it is not working
check now->
its working what was the mistake

sc and ec should their inside for loop.(because on evry iteration we want them to start from 0 and n-1)
and that while loop was of no use
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.