suffix arrays

any one please explain how SA CONSTRUCTION WORKS in this link :8UVnhS - Online C++ Compiler & Debugging Tool - Ideone.com