The suffix array data structure is closely tied to the suffix tree, and we have already seen in the previous chapter. The suffix array gives you the lexicographically (alphabetically) sorted order of the suffixes, where each suffix is represented by its index into the string x; see Figure 4-1.