Hard

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

CategoryData Structure
DifficultyHard
Build a string of length nO(n)
Search a pattern of length mO(m)
MemoryO(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.