KMP Implementations

Following on my previous post I set out to implement the Knuth-Morris-Pratt algorithm. &#xA; This algorithm shifts the pattern p along x , exploiting the structure in p to skip positions we know cannot match. To do this, it uses a so-called border array that we need to pre-compute.