Skip to content

Commit 380e244

Browse files
committed
Day12
1 parent f16f0b1 commit 380e244

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

leetcode3/최민지/820.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution:
2+
def minimumLengthEncoding(self, words: List[str]) -> int:
3+
words = set(words)
4+
5+
for word in list(words):
6+
for i in range(1, len(word)):
7+
words.discard(word[i:])
8+
9+
ans = 0
10+
11+
for word in words:
12+
ans += len(word) + 1
13+
14+
return ans
15+

0 commit comments

Comments
 (0)