Longest proper prefix-suffix (LPS)