Pregunta de entrevista de Wayfair

Dynamic programming questions, maximum subarray