We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a368e commit 31c2216Copy full SHA for 31c2216
problems/820.short-encoding-of-words.md
@@ -101,8 +101,8 @@ class Trie:
101
curr = self.Trie
102
for w in word:
103
curr = curr[w]
104
- # we meet '#'
105
- return len(curr) == 1
+ # len(curr) == 1 means we meet '#'
+ return len(curr) == 1
106
class Solution:
107
def minimumLengthEncoding(self, words: List[str]) -> int:
108
trie = Trie()
0 commit comments