Available question text
Given a permutation nums of 0..n-1, repeatedly follow the mapping i -> nums[i] from each start index until a value repeats and form a set; return the maximum size of any such set — equivalently, the length of the largest cycle in the permutation (n up to 10^5).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 565. Array Nesting
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source