String thematic essays

Minimum cycle notation

Examples not found, on the mouth at Hu
referred two pointers i = 0, j = 1, k = 0 is referred to k i, j at the beginning of the same longest string length k

If s [i + k] == s [j + k] k ++;
between if s [i + k]> s [j + k], i = i + k + 1, i to i + k means the can not be minimized, as will be smaller than j,
if s [i + k] <s [j + k], j = j + k + 1, empathy

This did o (n)


manacher

I do not want to say, directly on the code code


Guess you like

Origin www.cnblogs.com/lzqlalala/p/11613074.html