I have implemented the sub matrix sum query,no errors but its not giving the output,plz check this once…
Whats wrong with this code?
@aatish08
hello Aatish,
check this part of ur code
here when i and j will start from zero. in that case i-1 will be -1 and j-1 will be -1 so u will be accessing prev[-1][-1] which is wrong.
I did the correction but its throwing run time error now
Its working now thanks for the help
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.
