create suffix array for binary search