Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
class Solution:
def findWords(self, board: List[List[str]], words: List[str]) -> List[str]:
alphabets = [chr(ord("a") + i) for i in range(26)] + ["end"]
trie = {i:None for i in alphabets}
trie = {i:None for i in alphabets} #NOSONAR
for word in words:
root = trie
for letter in word:
if not root[letter]:
root[letter] = {i:None for i in alphabets}
root[letter] = {i:None for i in alphabets} #NOSONAR
root = root[letter]
root["end"] = True

Expand Down