module documentation

Provides the find_kmp function and compute_kmp_fail utility to perform a text search using the Knuth-Morris-Pratt algorithm.

Function compute_kmp_fail Utility that computes and returns KMP 'fail' list.
Function find_kmp Return the lowest index of T at which substring P begins (or else -1).
def compute_kmp_fail(P):

Utility that computes and returns KMP 'fail' list.

def find_kmp(T, P):

Return the lowest index of T at which substring P begins (or else -1).