- You are given a number n, representing the size of array a.
- You are given n numbers, representing elements of array a.
- You are required to calculate the inverse of array a.
- The inverse of a number is defined as the number created by interchanging the face value and index of digits of number.
- The key constraint is if the number is 5 digits long, it'll contain all the digits from 0 to 4 without missing any and without repeating any.
Example 1:
Input: n = 5, a[] = {4, 0, 2, 3, 1} Output: array- {1, 4, 2, 3, 0}
Constraints:
0 <= n < 10^7