IF ALL THE NUMBERS ARE NEGATIVE IN AN ARRAY?
HOW DO WE CALCULATE THE MAXIMUM SUM OF AN SUBARRAY?
MAXIMUM SUBARRAY SUM
then it will be zero
for empty subarray
and this case will be already consider in kadane’s algorithm
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask
YES , BUT IF ALL THE NUMBERS ARE NEGATIVE IN AN ARRAY, SO 0 should be wrong answer??
No
0 is the right ans which is for empty subarray
Ohk ji , thank you . . .