Flipkart interview question

Kadanes Algorithm variation based question