A tutorial on Suffix Arrays

Thanks a lot for the post…
Now I understand the suffix array implementation clearly.

I think in the c++ implementation it should be

for(stp=1, cnt = 1; cnt < N; stp++, cnt *= 2)

instead of

for(stp=1, cnt = 1; cnt/2 < N; stp++, cnt /= 2)
1 Like