c++
class Solution {\npublic:\n   vector sortJumbled(vector& mapping, vector& nums) {\n         vectorfinal;\n    vector>helper;\n        int j=0;\n        for(auto
class Solution {\npublic:\n   vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n         vector<int>final;\n    vector<pair<int,int>>helper;\n        int j=0;\n        for(auto it:nums){\n            string s=to_string(it);\n            string ans;\n            for(int i=0;i<s.length();i++){\n                ans.push_back(mapping[s[i]-48]+\'0\');\n            }\n        \n        helper.push_back({stoi(ans),j});\n            j++;\n            \n        }\n    sort(helper.begin(),helper.end());\n\n        for(auto it:helper)final.push_back(nums[it.second]);\n    // for(auto it:final)cout<<it<<" ";\n    return final;\n        \n    }\n};
[]