https://leetcode.com/problems/word-abbreviation/description/
Two words are only eligible to have the same abbreviation if they have the same first letter, last letter, and length
. Let's group each word based on these properties
, and then sort out the conflicts.
网友评论