Pergunta de entrevista da empresa Synopsys

how to judge whether there is a loop in a graph