Visa Inc. interview question

Maximum subarray problem