Pregunta de entrevista de Flipkart

Kadanes Algorithm variation based question