||🔥🔥Easiest Approach | Beats 96.78% 🚀| Must Watch 😎||
\n\n# Code\n\nclass Solution {\npublic:\n    int frequencyCount(vector<int>& mapping, int n) {\n        int num = 0;\n        int i = 0;\n        if (n == 0) {\
\n\n# Code\n```\nclass Solution {\npublic:\n    int frequencyCount(vector<int>& mapping, int n) {\n        int num = 0;\n        int i = 0;\n        if (n == 0) {\n            return mapping[0];\n        }\n        int power=1;\n        while (n) {\n            int remain = n % 10;\n            num = num + mapping[remain] * power;\n            power=power*10;\n            n = n / 10;\n            i++;\n        }\n        return num;\n    }\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        unordered_map<int, int> mp;\n        for (int i = 0; i < nums.size(); i++) {\n            int p = frequencyCount(mapping, nums[i]);\n            mp[nums[i]] = p;\n        }\n        vector<vector<int>> nums1(nums.size(), vector<int>(3));\n        for (int i = 0; i < nums.size(); i++) {\n            nums1[i][0] = mp[nums[i]];\n            nums1[i][1] = i;\n            nums1[i][2] = nums[i];\n        }\n        sort(nums1.begin(), nums1.end(),\n             [&](vector<int> a, vector<int> b) { return a[0] < b[0]; });\n        vector<int> result;\n        for (int i = 0; i < nums1.size(); i++) {\n            result.push_back(nums1[i][2]);\n        }\n        return result;\n    }\n};\n```
['Array', 'Ordered Map', 'Sorting', 'Python', 'C++', 'Java']