单词的压缩编码 解法一: 原始思路:将所有是其他单词后缀的单词删掉,剩下的求长度和就可以了 python1234567class Solution(object): def minimumLengthEncoding(self, words): res=set(words) for word in words: for k in range(1,len(word)): res.discard(word[k:]) return sum(len(word) + 1 for word in res)