Pregunta de entrevista de Pocket Gems

I was asked about how to use dynamic programming