Unique Word Abbreviation
A medium-tier problem at 27% community acceptance, tagged with Array, Hash Table, String. Reported in interviews at Google and 0 others.
Unique Word Abbreviation is a design problem where you build a data structure to validate abbreviations against a word dictionary. Google asks this one, and the acceptance rate sits at 27 percent, which tells you it's a gotcha disguised as a straightforward hash table problem. The trick isn't the abbreviation logic itself. It's understanding what "unique" actually means in context and handling edge cases around duplicate words in the dictionary. Most candidates nail the basic hash table setup then fail on boundary conditions during the live assessment. StealthCoder surfaces the working solution in seconds if you hit this problem and blank on the validation rules.
Companies that ask "Unique Word Abbreviation"
Unique Word Abbreviation is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share.
Get StealthCoderThe problem feels simple: abbreviate a word by taking the first and last letter plus the count of middle characters. Then validate whether an abbreviation matches a word in the dictionary. Where candidates trip up is the definition of uniqueness. An abbreviation is only valid if it matches exactly one word in the dictionary, but if the same word appears twice in the input list, you still treat it as one logical word. Hash tables are the right tool, but you need to track both the abbreviation-to-word mapping and handle collisions carefully. The obvious approach of just storing abbreviations fails when the same abbreviation maps to different words, or when you miscount duplicates. During a live OA, you'll have 30 seconds to lock in the data structure schema before implementation costs you. StealthCoder eliminates that risk by showing the correct hash approach upfront.
Pattern tags
You know the problem.
Make sure you actually pass it.
Unique Word Abbreviation recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built by an engineer at a top-10 tech company who can solve these problems cold but didn't want to trust himself in a 90-minute screen share. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Unique Word Abbreviation interview FAQ
What makes this a design problem instead of a pure algorithm problem?+
You're not solving a single computation. You're building a class or module that handles initialization, lookup, and validation across multiple calls. That stateful structure is why it's tagged Design. The tricky part isn't the abbreviation math; it's the data structure that enforces the uniqueness constraint correctly.
Why is the acceptance rate so low at 27 percent?+
Most people get the abbreviation generation right but fail the validation logic. They mishandle duplicate words in the dictionary or don't correctly distinguish between an abbreviation that maps to multiple different words versus the same word appearing twice. Those edge cases cause wrong answers during submission.
Do I need to worry about different programming languages here?+
The core logic is language-agnostic, but you do need to know how to initialize and populate a hash table efficiently in your language of choice. Python dictionaries and Java HashMaps both work fine. The bottleneck is correctness of the validation logic, not language mechanics.
How does this relate to the other topics in the tag list?+
Array and String are the inputs you process. Hash Table is the data structure that solves it efficiently. Design ties them together into a cohesive class interface. Understanding all four angles keeps you from building something that works on one test case but fails on real data.
Is this still asked at Google, or is it older?+
It's in the reports for Google, though with only one company listed, your exposure odds are lower than problems asked by five or ten companies. That said, the pattern of "validate membership with a hash table" appears across many interviews, so understanding this one teaches you a recurring trick.
Want the actual problem statement? View "Unique Word Abbreviation" on LeetCode →