← Questions
Minimal unique word abbreviations
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Given a list of distinct words, give every word the shortest abbreviation that no other word shares. An abbreviation keeps a prefix of the word, then the count of skipped letters, then the last letter; start with a one-letter prefix and grow the prefix for words that collide until they are unique. Keep the full word if the abbreviation would not be shorter.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
