You are given a mapping of length mapping[i] = j means that the digit
The mapped value of an integer is formed by replacing each of its digits with its mapped equivalent according to mapping. Leading zeros in the resulting mapped integer are ignored when evaluating its numerical value, though a mapped value of zero is treated as
You are also given an integer array nums. Sort the array nums in non decreasing order according to the mapped values of its elements and return the sorted array.
Note: If two elements have the same mapped value, they must preserve their original relative order from
nums.
Constraints:
mapping.length
mapping[i]
All the values of mapping[i] are unique.
nums.length
nums[i]
You are given a mapping of length mapping[i] = j means that the digit
The mapped value of an integer is formed by replacing each of its digits with its mapped equivalent according to mapping. Leading zeros in the resulting mapped integer are ignored when evaluating its numerical value, though a mapped value of zero is treated as
You are also given an integer array nums. Sort the array nums in non decreasing order according to the mapped values of its elements and return the sorted array.
Note: If two elements have the same mapped value, they must preserve their original relative order from
nums.
Constraints:
mapping.length
mapping[i]
All the values of mapping[i] are unique.
nums.length
nums[i]