Yelp interview question

Maximum subarray problem