Appearance
Knowledge base
Notes tagged #algorithm/sequence-search.
๐ฟ CS Algorithms
KMP (Knuth-Morris-Pratt) matches a pattern inside a longer text in linear time by reusing the longest proper prefix-suffix overlap, so the scan never backtracks. Here it locates a section's exact line range inside a long note, which is what Equation Citator needs for embedded previews.