Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int arr[n];
int parr[n];
for(int i = 0; i < n; i++){
cin>>arr[i];
parr[arr[i]-1] = i+1;
}
for(int i = 0; i < n; i++){
cout<<parr[i]<<" ";
}
}
Copy The Code &
Try With Live Editor
Input
4
2 3 4 1
2 3 4 1
Output
4 1 2 3
Demonstration
Codeforcess solution 136-A A. Presents ,C++, Java, Js and Python,136-A,Codeforcess solution