Suffix Tree
A suffix tree stores every suffix of one string. A linear-time build exists. Looking up a pattern reads the pattern once.
Costs
| Category | Data Structure |
| Difficulty | Hard |
| Build a string of length n | O(n) |
| Search a pattern of length m | O(m) |
| Memory | O(n) |
Questions
What is Suffix Tree?
A suffix tree stores every suffix of one string. A linear-time build exists. Looking up a pattern reads the pattern once.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.