Consider a string of length n (1 <= n <= 100000).
Determine its minimum lexicographic rotation.
For example, the rotations of the string “alabala
It seems that you should take first suffix in SA, which index is between 0 and length(S) - 1.
Some explanation: all rotations of S are in the beginning of S' suffixes from positions between 0 and length(S) - 1. Suffix array keeps suffixes in lexicographical order, so you just need to pick the first one which begins from rotation of S.