Simple cpp Solution using Custom Comparator
Approach\n Describe your approach to solving the problem. \nWe define a function transform which gives use the mapping of a given num as defined by the mapping 
# Approach\n<!-- Describe your approach to solving the problem. -->\nWe define a function `transform` which gives use the mapping of a given `num` as defined by the `mapping` vector.\n- In the `mapping` function we first convert `num` to string called temp and iterate over the string, replacing each char with the corresponding mapping. Finally we return the stoi(temp) which is the transformed integer\n- Since the number of digits in num will be $$log(num)$$ hence time complexity of this function of $$O(log(num))$$.\n\nIn the `sortJumbled` function we use custom comparator(passed as lambda function) to sort the nums array `nums`. The comparator compares the numbers a and b according to the transformed values obtained.\n- Since `nums[i]` is at most $$10^9$$ hence max number of digits of `nums[i]` will be $$9$$. and since size of nums$$(n)$$ is much much greater than $$9$$. so transform operation can be assumed as $$O(1)$$. Hence the overall time complexity : $$O(nlog(n))$$\n\n# Complexity\n- Time complexity: $$O(nlog(n))$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(n)$$ : required in merge sort\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int transform(int num, vector<int>& mapping){\n        string temp = to_string(num);\n        for(int i=0; i<temp.size(); i++){\n            temp[i] = mapping[temp[i]-\'0\'] + \'0\';\n        }\n        return stoi(temp);\n    }\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        sort(nums.begin(), nums.end(),[&](int a, int b){\n            return transform(a, mapping) < transform(b, mapping);\n        });\n        return nums;\n    }\n};\n```
['C++']