Oh My Algorithm
AlgorithmsExam study
KO
←
Strings

Algorithms · Strings

Choose one to explore step by step

Algorithms for finding patterns in text

KMP (Knuth-Morris-Pratt)

O(n + m)

Reuse earlier matches to avoid repeating text comparisons.

Rabin-Karp

Avg O(n + m)

Compare substring hashes with a pattern hash to identify candidate matches.

Boyer-Moore

Best O(n / m)

Compare from the pattern right edge and skip positions after mismatches.

Learning topics

O-M-A/© 2026 OH MY ALGORITHM
AboutPrivacyTerms