Pregunta de entrevista de Amazon

Lists, Stacks and Dynamic Programming