Pregunta de entrevista de MathWorks

Dynamic programming and array manipulation questions.