Does kadane algo work for all negative nos array

what change to be done in code to make it work for negative nos

@dakshi Nothing needs to be changed. It works fine for all the negative elements as well

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

@dakshi Take max element as - inf Initially.