Code to build suffix tree storing char indices instead of strings