Amazon Interview Question

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