Problem 565 · Medium

Array Nesting

Find the longest cycle in an array where each element points to another index.

Open the interactive visualisation