A suffix array stores suffix start positions in sorted order.

highlighted = computed this step

List every suffix

Append the sentinel to the worked string, then list every suffix. The sentinel sorts before every letter, so its suffix comes first after sorting.

sentinel $ sorts first\text{sentinel } \$ \text{ sorts first}
Worked DNA stringThe sentinel is not part of this DNA row.DNAGATTACA

The suffix array stores sorted start positions

The suffix array is the sorted list of suffix start positions. Sorting once lets us binary-search a pattern later, because equal prefixes sit together in the table.

suffix array=sorted suffix starts\text{suffix array}=\text{sorted suffix starts}
Suffix arrayRows are sorted suffixes of the sentinel-terminated string.RankStartSuffix07$16A$24ACA$31ATTACA$45CA$50GATTACA$63TACA$72TTACA$