Pergunta de entrevista da empresa MakeMyTrip

maximum sum in an array having positive and negative numbers.