Hulu interview question

Maximum subarray problem