Pregunta de entrevista de LinkedIn

A dynamic programming question. Graph theory