suffix arrays

any one please explain how SA CONSTRUCTION WORKS in this link :https://ideone.com/8UVnhS

//