Pregunta de entrevista de Google

one easy-ish question one dynamic programming