NeetCode #149LC-2191MediumArrays & Hashing
← Back to All Problems

#149 · #2191 · Sort the Jumbled Numbers(将杂乱数组排序)

📌 Problem Statement & Constraints

You are given a 0-indexed integer array nums and an array mapping of 10 digits. The mapped value of a number is obtained by replacing each digit d with mapping[d]. Sort nums by mapped value ascending, breaking ties by the original index. Constraints: 1 <= nums.length <= 3 * 10^4, 0 <= nums[i] < 10^9, mapping.length == 10.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!