MCPcopy Create free account
hub / github.com/ndleah/python-mini-project / starts_with

Method starts_with

Prefix_Trie/trie.py:41–47  ·  view source on GitHub ↗
(self, prefix: str)

Source from the content-addressed store, hash-verified

39 Otherwise, returns false.
40 """
41 def starts_with(self, prefix: str) -> bool:
42 curr = self.root
43 for c in prefix:
44 if c not in curr.children:
45 return False
46 curr = curr.children[c]
47 return True

Callers 1

main.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected