Initializes the suffix tree with the given text. Args: text (str): The text for which the suffix tree is to be built.
(self, text: str)
| 11 | |
| 12 | class SuffixTree: |
| 13 | def __init__(self, text: str) -> None: |
| 14 | """ |
| 15 | Initializes the suffix tree with the given text. |
| 16 | |
| 17 | Args: |
| 18 | text (str): The text for which the suffix tree is to be built. |
| 19 | """ |
| 20 | self.text: str = text |
| 21 | self.root: SuffixTreeNode = SuffixTreeNode() |
| 22 | self.build_suffix_tree() |
| 23 | |
| 24 | def build_suffix_tree(self) -> None: |
| 25 | """ |
nothing calls this directly
no test coverage detected