Hey can we build prefix matrix using only 1 iteration of 2 for loops like i am using 1st 2 foor loops for rows prefix sum
then another for columns prefix sum
Prefix matrix in the problem
To generate the prefix matrix, you will have to iterate twice.
Refer this code:
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.
