Upstart interview question

Maximum Subarray