New doubt on this algorithm

sir how to find the maxium sum in case of all negative numbers.plz help

@vikashsai1198 hey vikash the same algorithm will follow as kadane algorithm but there is small modification in the code you can refer to this link.