What happens when all the elements of the array are negative integers. That time the maximum sum should be the biggest integer in the array but according to the approach made in the algorithm it will be zero
Approach of Kadane's Algorithm
@quizzerkumar hey nikhal kadane algo will also work with small modification in the code you can refer to this code.
@quizzerkumar Hey NIkhil , You only need to change the if blocks of code which shown in the video and also initialized the maximumSum = INT_MIN.
code Link : https://ide.codingblocks.com/s/78212