data_structures.suffix_tree.example.example_usage¶
Functions¶
|
Demonstrate the usage of the SuffixTree class. |
Module Contents¶
- data_structures.suffix_tree.example.example_usage.main() None ¶
Demonstrate the usage of the SuffixTree class.
Initializes a SuffixTree with a predefined text.
Defines a list of patterns to search for within the suffix tree.
Searches for each pattern in the suffix tree.
- Patterns tested:
“ana” (found) –> True
“ban” (found) –> True
“na” (found) –> True
“xyz” (not found) –> False
“mon” (found) –> True