String Algorithms

Suffix Array

SUPER USEFUL Suffix Arrays as a data structure are widely used in areas such as data compression, bioinformatics. They are great for string matching problems.

Let be a string of length . The -th suffix of is the substring .

Since it is not efficient to store all the substrings, theĀ suffix arrayĀ will only store the integers that represent theĀ starting indexesĀ of the all the suffixes of a given string, after the aforementioned suffixes are sorted.

Resources

Applications

Finding a substring in a string (ONLINE) ā†’ If you know the string beforehand, you can just use the Z-Algorithm. However, if you donā€™t know the string beforehand.