Sir i think that the answer given to this ques is not correct.The answers say that to calculate the max wrapped i.e. circular sum we need to subtract the cumulative sum of array from the max sum of array created by multiplying each element with -1. (assume that max will come from circular only).
Assume the array -{200 ,-100, 101, -2,-3,100}
It does not fit with this…
Section arrays ,question maximun circular sub-array
1 Like
hey Ajay,
Can you tell me please what should be the final answer for this input according to you?
According to me the algorithm is fine for this test case also.
Yeah i got it.The algorithm works fine.
Ans would be 396 from [101 -2 -3 100 200]
1 Like