MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / search

Method search

Prefix_Trie/trie.py:29–35  ·  view source on GitHub ↗
(self, word: str)

Source from the content-addressed store, hash-verified

27 Otherwise, returns false.
28 """
29 def search(self, word: str) -> bool:
30 curr = self.root
31 for c in word:
32 if c not in curr.children:
33 return False
34 curr = curr.children[c]
35 return curr.is_end
36
37 """
38 Returns true if there is a previously inserted string word that has the prefix prefix.

Callers 3

readMailsFunction · 0.80
check_valid_filenameFunction · 0.80
main.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected