C
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nMapping and Sorting\n# 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nMapping and Sorting\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(nlogn)$$\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n# Code\n```\n/**\n * Note: The returned array must be malloced, assume caller calls free().\n */\nint compare(const void* a, const void* b) {\n    return (*(*(int**)a + 1) - *(*(int**)b + 1));\n}\n\n\nint* sortJumbled(int* mapping, int mappingSize, int* nums, int numsSize, int* returnSize) {\n    int** mapping_nums = malloc(sizeof(int *) * numsSize);\n    for(int i = 0; i < numsSize; i++) {\n        *(mapping_nums + i) = calloc(2, sizeof(int));\n        mapping_nums[i][0] = i;\n        mapping_nums[i][1] = mapping[nums[i] % 10];\n        int power = 10;\n        int new_num = nums[i] / 10;\n        while(new_num > 0) {\n            mapping_nums[i][1] += mapping[new_num % 10] * power;\n            power *= 10;\n            new_num /= 10;\n        }\n    }\n\n    qsort(mapping_nums, numsSize, sizeof(int *), compare);\n    int* ans = malloc(sizeof(int) * numsSize);\n    for(*returnSize = 0; *returnSize < numsSize; (*returnSize)++) {\n        ans[*returnSize] = nums[mapping_nums[*returnSize][0]];\n        free(*(mapping_nums + *returnSize));\n    }\n\n    free(mapping_nums);\n\n    return ans;\n}\n```
['C']