Sort the Jumbled Numbers
Given two 0-indexed integer arrays, mapping and nums, the task is to sort and print the array nums (elements separated by space) in non-decreasing order based on the mapped values of its elements.
The array mapping represents the mapping rule of a shuffled decimal system, where mapping[i] = j means that digit i should be mapped to digit j in this system.
The mapped value of an integer is the new integer obtained by replacing each occurrence of digit i in the integer with mapping[i] for all 0 ≤ i ≤ 9.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)