Pergunta de entrevista da empresa Meta

Given a DAG, write a function to return the length of the longest path.