An Awesome Post on Suffix Arrays !
It is the data structure to look out for when you are going for string Searching and want to reduce the time complexity greatly. So, Let us examine and start from basics.
What are Suffix Arrays ?
As simple as it can get , suffix arrays represent the rank of all possible suffixes of a given string .For example ,
String S = “ABDCASD”
Then the suffixes for the string S (with the numbers in front represent are ,
7 $ *
*$, A null character can be called a suffix of every string as it does no addition to the string itself . We will later on see why we chose to add NULL character to our algorithm . For NULL character that we used, we assume have highest lexicographic priority .
View original post 746 more words