Please read the new rule regarding the restriction on the use of AI tools. ×

uvzqra490's blog

By uvzqra490, history, 8 years ago, In English

Given a suffix array we have to calculate the lexicographical smallest string which has the same suffix array . Can someone please give some hint how to solve this problem ?

  • Vote: I like it
  • +25
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +33 Vote: I do not like it

Assume that x y — two consecutive suffices in suffix array. First of all, we know that s[x] <= s[y]. Moreover, (s[x] < s[y]) or ((s[x] = s[y]) and (s[x+1:] < s[y+1:])). Do we have a way to compare two suffices?

I think it is big enough hint to solve the problem, but if you still don't understand how after 20-30 minutes thinking, I can explain solution in PM.