original. After the move the boxes were put back in a different order, giving shuffled: the same numbers, rearranged. All numbers are distinct.
For every position i of original, report the position in shuffled where that box now stands. Return the array of these positions (0-based).original=[7, 3, 9, 1], shuffled=[1, 9, 7, 3] → [2, 3, 1, 0]
In the copy, 7 sits at position 2, 3 at position 3, 9 at position 1 and 1 at position 0.
original=[40, 15], shuffled=[40, 15] → [0, 1]
The order did not change, so every box stayed in place.
original=[4], shuffled=[4] → [0]
original are distinct, and shuffled is a rearrangement of themoriginal=[7, 3, 9, 1], shuffled=[1, 9, 7, 3]
[2, 3, 1, 0]
Run checks the first 3 tests in your browser. Submit checks all 41 tests on the server, hidden ones included.