Pergunta de entrevista da empresa LinkedIn

A dynamic programming question. Graph theory