title: Circular Suffix Array Creation
body: <p>For a homework problem, we are given a String of length n, and we're told to create the sorted suffixs and sort them in such a way that we can return the string corresponding to the original index of the ith index in the sorted list.  For example, given the string "bears", we have as follows:</p>
  
  <p>!<img src="https://i.imgur.com/DDPENkr.png" alt="Commercial Photography"></p>
  
  <p>In other words, a final_index[i] value of 2 means that the suffix originally at index 2 is at index i in the sorted list.</p>
  
  <p>My problem is that the obvious solution, to use substring and build the sorted_suffixes and then to sort those isn't allowed because we're not allowed to explicitly build the suffixes.  How can this limitation be overcome?  Thank you for your help.    </p>