Description
Submission
class Solution { public: vector<int> anagramMappings(vector<int>& A, vector<int>& B) { map<int, int> Map; int n = B.size(); for(int i = 0; i < n; ++i) { Map[B[i]] = i; } vector<int> rets(n); for(int i = 0; i < n; ++i) { rets[i] = Map[A[i]]; } return rets; } };