You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an array of integers A of size N that is a permutation of [0, 1, 2, ..., (N-1)]. Rearrange the array such that A[i] = j is changed to A[j] = i for all i and j form 0 to N-1. Note: Try solving this with O(1) extra space.