(self, text: str)
| 8 | self._trie: dict = {} |
| 9 | |
| 10 | def insert_word(self, text: str) -> None: |
| 11 | trie = self._trie |
| 12 | for char in text: |
| 13 | if char not in trie: |
| 14 | trie[char] = {} |
| 15 | trie = trie[char] |
| 16 | trie[END] = True |
| 17 | |
| 18 | def find_word(self, prefix: str) -> tuple | list: |
| 19 | trie = self._trie |
no outgoing calls
no test coverage detected