MakeMyTrip interview question

An array question on Kadane's algorithm.