Microsoft interview question

Maximum Subarray Problem