How to approach

Cannot figure out how to approach this question… how to start it?

hi @Riya-Verma-1207263756078812,
Logic: Inverse is Simply swapping the value of the array with the value at that index.

  1. Create a new Array say narr and original array is arr.
  2. now at the arr[i]th index of narr save the ith value.(previously i is the index and arr[i] is the value bt now arr[i] is the index and i is the value.)
  3. print new array.

refer here https://ide.codingblocks.com/s/661572