Pregunta de entrevista de Madhees

Tweaked Kadane's algorithm Get random in o(1)