array is …
-1 2 3
4 5 6
7 8 9
ans must be sum of
4 5 6
7 8 9
but it is showing 43 why???
array is …
-1 2 3
4 5 6
7 8 9
ans must be sum of
4 5 6
7 8 9
but it is showing 43 why???
Actually we both are doing same mistake here
ans is not that matrix since we are going for max sum sub matrix it is actually bigger one, that is original one because it has higher sum if we make all row 0 elements negative then only it will show sum of that matrix we are discussing about.
And original ans is 43 correct because 1 needs to be subtracted
twice from original matrix
Machine never goes wrong !!!
lol
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.