Question d’entretien chez Mastercard

Kadane algorithm based array question