Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 565. Array Nesting
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.