What will be the approach if all the elements are negative in the array. How the code will change or is there any other way to implement
Test case in which all elements are negative
the code will remain same for the most part, the only change that we would have to make is that we will first compare current_sum with maximum_so_far then compare current_sum with 0.