In the Video of maximum SubArray Sum using kadane’s algorithm code is shown but it doesn’t work if only negative element is present in the array.
I think this code works fine in which only if block is interchanged and maximumSum is initialized with INT_MIN.
code link : https://ide.codingblocks.com/s/78212