Create Maximum Subarray (O(n)) solution

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.