Maximum subarray sum 2

why there no garbage value for the case of i=0
here is the code:

@Bansaljatin05 hey jatin this is due to prestore of currentsum array.

Sir but sum computed is wrong…
And ans at -1 index is varying in 2 different codes.
Also elaborate prestoring of arrays working…how it works

@Bansaljatin05 hey jatin there is a problem in video solution I will send you correct code.

1 Like

Please send the code sir!

Please send the correct code sir!!!

send correct code please??

sorry : this the code: https://ide.codingblocks.com/s/156937

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.

But send the correct code for maximum subarray sum