Please specify the corrections needed

hi @sbhardwaj1be21_2a991b329433c059,
Algo

  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. return new array.

refer this code ->

#include<bits/stdc++.h>
using namespace std;
int main() {
   int N;
   cin>>N;
   int a[N];
   for(int i =0;i<N;i++)
   	cin>>a[i];
   int b[N];
   for(int j=0;j<N;j++){
   	b[a[j]]=j;
   }
   for(int i=0;i<N;i++){
       cout<<b[i]<<" ";
   }
   return 0;
}