Amazon interview question

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