In the problem 914F - Substrings in a String, the suffix array construction constant is rather big. The update queries can reach nearly 2 seconds in runtime for $$$O(n\sqrt{n})$$$ operations. The $$$O(n)$$$ suffix array algorithm I used is only a bit faster than $$$O(n\log{n})$$$ one used normally. Is there actually a fast suffix array algorithm that works for small arrays like these?



