Bloomberg Interview Question

Find cycle in an array