← Questions
Shortest unique abbreviation for every word
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Abbreviate each word in a list of distinct words as a prefix, the count of the letters in between, and the last letter (like becomes l2e). When two words share an abbreviation, lengthen their prefixes until every abbreviation is unique, and keep a word whole if abbreviating does not make it shorter. Return the abbreviations in input order.
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
