Pregunta de entrevista de Baidu

leetcode stock, which is a dp