Why my test cases arent passing?
At first calculate the maximum sum subarray using kadane. Then make all elements negative. Again apply kadane algo and total sum. answer will be max of first case and total sum+max sum(after negation)
At first calculate the maximum sum subarray using kadane. Then make all elements negative. Again apply kadane algo and total sum. answer will be max of first case and total sum+max sum(after negation)