Solve the maximum subarray problem (Kadane’s Algorithm) to find the contiguous subarray with the largest sum.