Algorithm SAIS-for-eBWT
| Step 1 | remove strings of length 1 from (these will be added back at the end) |
| Step 2 | assign cyclic types to all positions of strings from |
| Step 3 | use procedure Induced Sorting to sort cyclic LMS-substrings |
| Step 4 | assign names to cyclic LMS-substrings; if all distinct, go to Step 6 |
| Step 5 | recurse on new string multiset , returning array A′, map A′ back to A |
| Step 6 | use procedure Induced Sorting to sort all positions in , add length-1 strings in their respective positions, return (A, ) |