Rafael Interview Question

Maximum Subarray problem from leetcode