(self, prefix: str)
| 33 | return node.is_word |
| 34 | |
| 35 | def has_prefix(self, prefix: str) -> bool: |
| 36 | node = self.root |
| 37 | for c in prefix: |
| 38 | if c not in node.children: |
| 39 | return False |
| 40 | node = node.children[c] |
| 41 | # Once we've traversed the nodes corresponding to each |
| 42 | # character in the prefix, return True. |
| 43 | return True |
nothing calls this directly
no outgoing calls
no test coverage detected