KMP Search with Continuation

This is a C++ implementation of the Knuth-Morris-Pratt string-search algorithm (Wikipedia). In addition, this implements a continuation for finding all instances. Running time is O(haystack_size + needle_size).

The code is in git and as follows:

One thought on “KMP Search with Continuation

  1. Pingback: 2-Dimensional String Search | Derek Illchuk - Computations

Leave a Reply

Your email address will not be published. Required fields are marked *