Search
⌘K

Leetcode 760. Find Anagram Mappings

Given two arrays A and B where B is a permutation (an anagram) of A, return an index array P such that for each i, B[P[i]] == A[i]; when values repeat, each occurrence must map to a distinct matching index. The task is to construct this index mapping efficiently (linear time/space).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.