Pregunta de entrevista de Microsoft

related to dynamic programming question