thisnis my code
Why my code is not passing the tst cases in the kadanes algo question of finding maximum subarray sum
@kshitiz_joshi
Initialise csum and maxsum to 0 again for every new testcase.
Otherwise it just picks up old values and computes sum based on that giving wrong outputs.
1 Like