Maximum Subarray - Read Statement

Given an integer array nums, find the subarray with the largest sum and return the sum.

Example: For [-2,1,-3,4,-1,2,1,-5,4], the answer is 66 from subarray [4,-1,2,1]. While Kadane's algorithm solves it in O(n)O(n), the D&C approach is instructive.