Pregunta de entrevista de Google

Live coding interview with the task on dynamic programming.