Pergunta de entrevista da empresa Amazon

How do you find out if a graph has a circular reference ?