Fig. 2From: RepeatAnalyzer: a tool for analysing and managing short-sequence repeat dataA flowchart of the Knuth-Morris-Pratt string searching algorithm. KMP is a computationally efficient algorithm for finding short text patterns in a long string of characters. offsets is a list of numbers. The length of offsets is the number of characters in pattern. Each entry in offsets corresponds to the distance counters i and j are adjusted when a mismatch occurs. len(item) denotes the length of item Back to article page