/ ************** KMP ************************************************* / VOID GetNext (charr * T, int next []) {INT j = -1; int i = 0; Next [0] = - 1; while (i = strlen (t) ) Return I-Strlen (T); else return -1;}
Due to the language translation machine, the quick row, two-point search, and KMP were used at the time.
In fact, later discovered that the use of a Hash table should be the fastest.