One liner
My first post, apologies for any mistakes\n\n# Intuition\n Describe your first thoughts on how to solve this problem. \nUsing sorted function is the shortest wa
My first post, apologies for any mistakes\n\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nUsing sorted function is the shortest way to sort. So lets try it, using the key parameter to define our custom function\n# Approach\n<!-- Describe your approach to solving the problem. -->\nRelate element of nums to its mapping\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nsorted function is O(nlogn), mapping each integer is n*O(k) where k is number of digits in the largest integer\n- Space complexity:\nnot sure of the sorted function\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def sortJumbled(self, mapping: List[int], nums: List[int]) -> List[int]:\n        return sorted(nums, key=lambda x:int("".join([str(mapping[int(i)]) for i in str(x)])))\n```
['Python3']