Find Recurring Names
Problem Overview
- Task: Given realNames and allNames, identify real users who registered multiple accounts using permutations of their names.
- Input/Output: Return distinct real names with duplicates in lexicographical order; if none, return "None".
- Constraints: n,m up to 1e5; names up to 10 chars; lowercase; realNames unique; no two are permutations; each allNames maps to a real name.
- Context: Detect coupon abuse via username permutations.
- Source: From Amazon interviews; a coding interview problem and common interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
