Search
⌘K

Leetcode 288. Unique Word Abbreviation

Design a structure that, given a dictionary, computes each word's abbreviation (first letter + count of omitted letters + last letter, with short words typically unchanged) and answers queries on whether a given word's abbreviation is unique among the dictionary. The core challenge is handling abbreviation collisions and duplicates efficiently so isUnique(word) returns true only if no other distinct word shares the same abbreviation.


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.