Add suffix array construction code