see suffix array
This page is auto-translated from [/nishio/Suffix Array](https://scrapbox.io/nishio/Suffix Array) using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers. suffix array Suffix Array(SA)
Test with this. https://atcoder.jp/contests/arc050/tasks/arc050_d
This page is auto-translated from /nishio/接尾辞配列 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.