AlgoMaster Logo

KMP (Knuth-Morris-Pratt) Algorithm

text=aabxaaabxaaab,pattern=aaab
0 / 44
algomaster.io
Step:KMP Algorithm: First build the LPS (Longest Proper Prefix Suffix) array, then search.