Easy C++ (mapping + sorting) Solution....
Intuition\n Describe your first thoughts on how to solve this problem. \nfrom problem statement we can figure out that we will need data structure that store va
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nfrom problem statement we can figure out that we will need data structure that store value and mapping.\n\nfor creating transformed number we have to apply standard unit digit concept.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nuse unordered_map or vector and create mapping of original value and transformed value.\n\nafter that sort vector in increasing order based on transformed value and if transformed is same sort them based on their relative order.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n    O(NlogN);\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(N)\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {\n        unordered_map<int, pair<int, int>> mpp;\n        int i = 0;\n        for (int it : nums) {\n            int temp = it;\n            int mapped_number = 0;\n            int k = 0;\n            if (it == 0) {\n                mpp[it] = {mapping[it], i};\n                i++;\n            } else {\n                while (temp > 0) {\n                    int unit_digit = temp % 10;\n                    unit_digit = mapping[unit_digit];\n                    mapped_number = mapped_number + (unit_digit * pow(10, k));\n                    k++;\n                    temp = temp / 10;\n                }\n                mpp[it] = {mapped_number, i};\n                i++;\n            }\n        }\n\n        sort(nums.begin(), nums.end(), [&](int a, int b) {\n            if (mpp[a].first != mpp[b].first) {\n                return mpp[a].first < mpp[b].first;\n            } else {\n                return mpp[a].second < mpp[b].second;\n            }\n        });\n\n        return nums;\n    }\n};\n```
['Array', 'Hash Table', 'Sorting', 'C++']