KMP — Failure Function & Search
Interactive visualizations for Chapter 1 of the Advanced Algorithms notes
KMP — Failure Function (sp values) & Search
Visualize the sp (border) array computation and then step through the KMP search showing how mismatches use the failure function to skip alignments.
Failure Function Table
KMP Search — Step by Step
Watch how KMP uses the failure function to avoid re-scanning characters. The arrow shows where j falls back to on a mismatch.