In this UVA 10755 — Garbage Heap , we have to find maximum sum of any sub range.
I have seen the solution and editorial available online . But I don't understand the insight . How 2d max sum and kadane algorithm is applying to get the ans. I meant How it is working actually .