C++ ✅ || 100% faster✅ || Simple sorting with custom comparator
\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        vector<pair<int, int>> v;\n        int n = nums.siz
```\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        vector<pair<int, int>> v;\n        int n = nums.size();\n        for(int i = 0; i < n; i++) {\n\t\t\tif(nums[i] == 0) {\n\t\t\t\tv.push_back({mapping[0], i});\n\t\t\t\tcontinue;\n\t\t\t}\n            int m = nums[i];\n            int val = 0;\n            int j = 1;\n            while(m > 0) {\n                int t = m % 10;\n                val = mapping[t] * j + val;\n                m /= 10;\n                j *= 10;\n            }\n            v.push_back({val, i});\n        }\n        \n        sort(v.begin(), v.end(), [&](const pair<int, int>&a, const pair<int, int>&b) {\n            if(a.first == b.first) {\n                return a.second < b.second;\n            }\n            return a.first < b.first;\n        });\n        \n        vector<int> ans;\n        \n        for(auto ele : v) {\n            int id = ele.second;\n            ans.push_back(nums[id]);\n        }\n        return ans;\n    }\n};\n```
['C', 'Sorting']