Pregunta de entrevista de Bloomberg

Standard dynamic programming problem (shortest path) and things about recursive calls.