Detect Colliding Riot IDs After Name Normalization

Last updated: November 29, 2026

Quick Overview

Riot IDs have the form GameName#TagLine. Given a list of submitted IDs, group the ones that would collide after normalizing case, Unicode width and extra whitespace, and return only the groups with more than one member.

Riot Games
Coding & Algorithms
Software Engineer
Riot Games
November 29, 2026
Software Engineer
Online Assessment
Coding & Algorithms
Easy

0

0

0 solved


Riot IDs have the form GameName#TagLine. Given a list of submitted IDs, group the ones that would collide after normalizing case, Unicode width and extra whitespace, and return only the groups with more than one member.

An online-assessment style task tied to the Riot account system, where names must be unique per tag line across many locales. The grader looks for a correct canonical key, sensible Unicode handling, and a hash map grouping in linear time.

What the Interviewer Expects
  • Split on the first # into game name and tag line
  • Define a canonical form: Unicode NFKC, casefold, collapse whitespace
  • Group with a dictionary keyed by the canonical form
  • Return only groups of size two or more
  • Discuss why casefold beats lower for international names
Key Topics to Cover
hashing
string normalization
Unicode
grouping
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you also catch visually confusable characters such as Cyrillic a versus Latin a?
  • How would you enforce uniqueness at write time across a distributed account database?
  • What if the input does not fit in memory?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Two IDs collide if they look like the same player to a human: Nova#KR1, nova#kr1, Nova #KR1 and the full-width Nova#KR1 should be one group. The original strings are kept in the output so su...

High-Level Design

Map every ID to a canonical key, then bucket by key. The canonical key is the core design decision: NFKC folds full-width and compatibility characters to their plain forms, casefold() handles cases ...


Submit Your Answer
Markdown supported

Related Questions