what change to be done in code to make it work for negative nos
Does kadane algo work for all negative nos array
like
a[-9 ,-8, -5,-100 ,-38]
curr sum will be zero
as well as maxsum also 0
while ans shoukd be =-5
plz check once in video kadane algo