title: Complete Suffix Array
body: <p>A suffix array will index all the suffixes for a given list of strings, but what if you're trying to index all the possible unique substrings?  I'm a bit new at this, so here's an example of what I mean:</p>
  
  <p>Given the string</p>
  
  <pre><code>abcd
  </code></pre>
  
  <p>A suffix array indexes (at least to my understanding)</p>
  
  <pre><code>(abcd,bcd,cd,d)
  </code></pre>
  
  <p>I would like to index (all the substrings)</p>
  
  <pre><code>(abcd,bcd,cd,d,abc,bc,c,ab,b,a)
  </code></pre>
  
  <p>Is a suffix array what I'm looking for?  If so, what do I do to get all the substrings indexed?  If not, where should I be looking?  Also what would I google for to contrast "all substrings" vs "suffix substrings"?</p>