KMP algorithm (ASTAR Baidu language translator)

xiaoxiao2021-04-09  486

/ ************** 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.

转载请注明原文地址:https://www.9cbs.com/read-133136.html

New Post(0)