Help me with code, so of all submatrices with help prefix sum array

the indendation of the code is really poor, so it is sort of unreadable.


I have tried fixing your logic however, you can go through it