Amdex interview question

they questions from Dynamic Programming