565. Array Nesting
A zero-indexed array A consisting of N different integers is given. The array contains all integers in the range [0, N - 1].
Sets S[K] for 0
S[K] = { A[K], A[A[K]], A[A[A[K]]], ... }.
Sets S[K] ar
原创
2017-09-07 23:02:59 ·
205 阅读 ·
0 评论