public class Solution { public int ArrayNesting(int[] nums) { ; ; i < nums.Length; i++) { ; ; size++) { int ak = nums[k]; nums[k] = -; // mark a[k] as visited; k = ak; } maxsize = Math.Max(maxsize, size); } return maxsize; } } https://leetcode.com/pr…