Sponsored
Use these hints if you're stuck. Try solving on your own first.
Create a hashmap so that D[x] = i whenever B[i] = x. Then, the answer is [D[x] for x in A].
Solve with full IDE support and test cases