We are given an array with numbers from ranging from 1 to n (no duplicates) where n = size of the array. We are allowed to do the following operation : arr[i] = arr[ar