Pergunta de entrevista da empresa Uber

Write an algorithm which checks for cyclical dependencies in a graph