Shortest Unique Prefix
Asked at Meta · Coding Questions · Difficulty: Medium · Last asked Jun 18, 2026
For each word in a list, return the shortest prefix that uniquely distinguishes it from every other word, preserving the original input order.
Loading the problem…