Find Anagram Mappings
easy
1. You are given two integer arrays(A and B), where B is an anagram of A. 2. B is an anagram of A means B is made by randomizing the order of the elements in A. 3. For every element in A, you have to print the index of that element in B. Note -> Both arrays(A and B) are of the same length.
Constraints
1 <= length of both arrays <= 10^4 1 <= A[i],B[i] <= 10^5
Format
Input
A number N a1 a2.. N numbers b1 b2.. N numbers
Output
N space separated integers.
Example
Sample Input
6
1 2 3 4 5 2
4 3 2 1 5 2
Sample Output
3 2 1 0 4 5
Question Video