Easy_To_Understand || C++ || Simple  Sorting || With detailed Explanation
The order of original number was important , So stored the formed number after converting that number according to mapping and its index (i) in a vector of pair
The order of original number was important , So stored the formed number after converting that number according to mapping and its index (i) in a vector of pairs. Just Sort this using the stl, as default sort , sorts the value in ascending order by comparing  on first number of pair, if the first number of pair are same then, it sorts according to second number of pair. At last just traverse in vector of pairs and get and push the original number in ans  and return ans.\n```\nclass Solution {\npublic:\n    vector<int> sortJumbled(vector<int>& mapping, vector<int>& nums) {   \n        vector<pair<int,int>>vec;\n        \n        for(int i = 0;i<nums.size();++i){\n            int num = nums[i];\n          string number = to_string(num); \n            string formed = "";\n          for(int j= 0;j<number.size();++j){\n              formed+=(to_string(mapping[number[j]-\'0\']));\n          }\n          int value = stoi(formed);\n          vec.push_back({value,i});\n        }\n        \n        sort(vec.begin(),vec.end());\n        vector<int>ans;\n        for(auto pa:vec){\n            int found = nums[pa.second];\n            ans.push_back(found);\n        }\n        \n        return ans;\n    }\n};\n\nTime Complexity: O(n*len(nums[i]))\nSpace Complexity: O(n)\nFor more about to_string stl, refer to\nhttps://en.cppreference.com/w/cpp/string/basic_string/to_string
['Sorting']