Amazon interview question

Find a loop in a graph