Amazon Interview Question

Find loop in a list