Skip to content

Commit c3a70d8

Browse files
Update taurus09318976.py
1 parent 2fd7637 commit c3a70d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

design-add-and-search-words-data-structure/taurus09318976.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self):
2222
self.root = TrieNode()
2323

2424
# 단어를 문자별로 트라이에 추가
25-
def addWord(self, word: str) -> None:
25+
def addWord(self, word: str):
2626
node = self.root
2727
for char in word:
2828
if char not in node.children:
@@ -33,7 +33,7 @@ def addWord(self, word: str) -> None:
3333
node.is_end = True
3434

3535
# 깊이 우선 탐색(dfs)함수로 재귀적 탐색.
36-
def search(self, word: str) -> bool:
36+
def search(self, word: str):
3737
def dfs(node, index):
3838
if index == len(word):
3939
return node.is_end

0 commit comments

Comments
 (0)