Pregunta de entrevista de Amazon

general question regarding dynamic programming