Kedane's algo in cpp course

it wont work if all the entries are negative right?

@sans_sehgal Hey sanskar sehgal, you can also calculate the maximum SubArray Sum of negative elements of array by kadane’s algorithm. Refer above code. In my code i only interchange the position of if block of code which shown in the video and also initialized the maximumSum=INT_MIN.

If you not getting this code than surely i will help.

code Link : https://ide.codingblocks.com/s/78212

@sans_sehgal Hey sanskar sehgal, if your query is resolved. Please mark this doubt as resolved and if you have any query then tell me, I am happy to help you out.