[C++] Easy Implementation | Short | Easy Understanding
\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        int n = nums.size();\n        map<int,vector<int>> 
```\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        int n = nums.size();\n        map<int,vector<int>> mp;\n        for(int i=0; i<n; i++){\n            string curr = to_string(nums[i]);\n            int newVal = 0;\n            for(int j=0; j<curr.length(); j++){\n                int currDig = curr[j] - \'0\';\n                int newDig = mapping[currDig];\n                newVal = newVal * 10 + newDig;\n            }\n            mp[newVal].push_back(nums[i]);\n        }\n        vector<int> ans;\n        for(auto it : mp){\n            for(int v : it.second) ans.push_back(v);\n        }\n        return ans;\n    }\n};\n```
['C']