Pergunta de entrevista da empresa Bloomberg

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