CPP Maximum SubArray Sum1

maximumSum should be initialized to negative infinity instead of 0. This will handle the case where the array has only negative integers.

Hey Kannappan, yes you are right maximumSum should be initialized to negative infinity or first element of the array instead of 0, but what’s your doubt int this ?

hi, it is not a doubt. it is a correction that needs to be made to one of the videos where the initialization is done as 0. The video with title as CPP Maximum SubArray Sum1.

Hey Kannappan, in that video it is assumed that all the elements of the array will be positive.

Thank you Sanjeet! That answers my question.