Pregunta de entrevista de Amazon

A coding question about finding the greatest subarray.