Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 527. Word Abbreviation
Given a list of words, generate the shortest unique abbreviation for each word of the form prefix + count of omitted middle letters + last letter (or keep the full word if abbreviation isn't shorter), resolving conflicts by expanding the shared prefix until every abbreviation is unique. The core challenge is grouping conflicting words and efficiently finding the minimal prefix length (often via grouping or a trie) needed to make each abbreviation distinct.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late June, 2025
Meta
Manager
given 2 strings, one being alphaneumeric abbreviation and other being bigger string. return boolean if bigger string is satisfies the pattern of smaller string as its abbreviation. For ex. string a = "i18n" b = "internationalization", a = "8" b = "Facebook", a = "a2b3c" c = "aaabbbbc"
Late June, 2024
Meta
Senior
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.