Radix sort solution
Intuition\nFor map number, we need get every digit. Radix sort do the same.\n\n# Approach\nJust use LSD-radix sort(Least Significant Digit radix sort) for sort 
# Intuition\nFor map number, we need get every digit. Radix sort do the same.\n\n# Approach\nJust use LSD-radix sort(Least Significant Digit radix sort) for sort array, but map every digit\n\n# Complexity\n![\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 2024-06-10 \u0432 20.17.22.png](https://assets.leetcode.com/users/images/f9216325-0989-49fe-a480-8351a7db81da_1718025692.1727946.png)\n\n- Time complexity:\n$$O(m*n)$$ , where m == 9 for this task because max nums[i] < $$10^9$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```\nclass Solution {\n    fun sortJumbled(mapping: IntArray, nums: IntArray): IntArray {\n        fun digit(value: Int, shift: Int): Int {\n            if (value == 0) return mapping[value]\n            var s = 1\n            for (i in 1 until  shift) {\n                s *= 10\n            }\n            val res = value / s\n            if (res == 0) return 0\n            return mapping[res % 10]\n        }\n\n        fun radixSort(start: IntArray): IntArray {\n            var a = start\n            var b = IntArray(a.size)\n            val n = a.size\n            val m = 9\n            val k = 10\n            val c = IntArray(k)\n            var count = 0\n            var temp = 0\n            for(i in 1 .. m) {\n                for (j in 0.. k-1) {\n                    c[j] = 0\n                }\n                for (j in 0..n-1) {\n                    val d = digit(a[j], i)\n                    c[d]++\n                }\n                count = 0\n                for (j in 0 .. k-1) {\n                    temp = c[j]\n                    c[j] = count\n                    count += temp\n                }\n                for (j in 0 .. n - 1) {\n                    val d = digit(a[j], i)\n                    b[c[d]] = a[j]\n                    c[d]++\n                }\n                val tempA = a\n                a = b\n                b = tempA\n            }\n            return a\n        }\n\n        return radixSort(nums)\n    }\n}\n```
['Radix Sort', 'Kotlin']