Programmer's Wiki
Advertisement

a suffix array is a data structure that can be used to solve many string based problems. It is mainly used as an alternative to the Suffix trie as it uses much less space.

Explanation[]

this is an array of indexes into the string for all the different suffixes it contains. The indices are sorted according to the alphabetical order of their suffix. This allows a Binary search to be used for searching. It also groups substrings with the same prefix together making it easy to count them.


External Links[]

Advertisement