Pergunta de entrevista da empresa Cadence Design Systems

Provide a solution of a graph problem.