Sir/Mam, if we go as per the logic used in the video, if we input an array containing all the negative integers, then this code will not give correct answer. It will give 0 as answer because current sum will always turn out to be 0.
In the loop used for cs and ms
U can make little bit changes in it to consider negatives also
Initalize maxsum as INT_MIN
And in loop before checking for sum<0 add statement to check max