sir here as given is sample input
8, -8, 9, -9, 10, -11, 12
here maximum subarray should be 23
12+8-8+9-9+10-11+12=23
isnt it???
sir here as given is sample input
8, -8, 9, -9, 10, -11, 12
here maximum subarray should be 23
12+8-8+9-9+10-11+12=23
isnt it???
you can’t consider 12 twice as it is present only ones in array