Problem 1392 · Hard
Find the longest proper prefix that is also a suffix, using the prefix function to reuse matched lengths.
Open the interactive visualisation