Skip to content

Commit 803e819

Browse files
authored
Update add_and_search_word.py
1 parent f48cff2 commit 803e819

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

add_and_search_word.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class TrieNode: # 参考implement_trie.py实现
44
def __init__(self):
@@ -42,4 +42,6 @@ def dfs_search(self, root, word, i): # 实现search
4242
else: # 搜索下一层
4343
if self.dfs_search(trie, word, i + 1):
4444
return True
45-
return False
45+
return False
46+
47+
# medium: http://lintcode.com/zh-cn/problem/add-and-search-word/

0 commit comments

Comments
 (0)