Pregunta de entrevista de Amazon

Leetcode question, such as dynamic programming, etc