About 487,000 results
Open links in new tab
  1. Knuth–Morris–Pratt algorithm - Wikipedia

    The most straightforward algorithm, known as the "brute-force" or "naive" algorithm, is to look for a word match at each index m, i.e. the position in the string being searched that corresponds to …

  2. KMP Algorithm for Pattern Searching - GeeksforGeeks

    Oct 10, 2025 · The Knuth-Morris-Pratt (KMP) algorithm is an efficient string matching algorithm used to search for a pattern within a text. It uses a preprocessing step to handle mismatches …

  3. Knuth-Morris-Pratt Algorithm - Online Tutorials Library

    To avoid such redundancy, Knuth, Morris, and Pratt developed a linear sequence-matching algorithm named the KMP pattern matching algorithm. It is also referred to as Knuth Morris …

  4. Knuth-Morris-Pratt Algorithm | Brilliant Math & Science Wiki

    The string matching problem can be relevant to many situations including but not limited to using the search feature in text editors, building up a database for a search engine or processing …

  5. Knuth-Morris-Pratt (KMP): Efficient Pattern Matching Algorithm ...

    Sep 5, 2025 · Learn the Knuth-Morris-Pratt (KMP) algorithm for efficient string pattern matching with step-by-step examples, visual explanations, and interactive code demonstrations.

  6. KMP Algorithm: String Matching, Time Complexity & Example

    Dec 15, 2025 · By using the Knuth-Morris-Pratt algorithm, you can get efficient results even for large datasets. This is because it uses linear time, which means that if the text becomes twice …

  7. “Cracking the KMP Algorithm: The Ultimate Guide to Fast String Matching

    Feb 18, 2025 · This is where the Knuth-Morris-Pratt (KMP) algorithm comes in — a genius solution that optimizes string searching to O (N + M) using preprocessing. When I first encountered …

  8. KMP Algorithm: Mastering Efficient Pattern Matching in Strings

    Among the various algorithms designed for this purpose, the Knuth-Morris-Pratt (KMP) algorithm stands out as a powerful and elegant solution. In this comprehensive guide, we’ll dive deep into …

  9. KMP Algorithm | Knuth-Morris-Pratt String Matching Method

    Learn the Knuth-Morris-Pratt (KMP) string matching algorithm with O (n+m) time complexity. Includes interactive visualization and implementations in Python, C++, and C# with LPS array …

  10. Knuth-Morris-Pratt in C++ - GeeksforGeeks

    Jul 23, 2025 · The Knuth-Morris-Pratt (KMP) is an efficient string-matching algorithm developed by Donald Knuth, Vaughan Pratt, and James H. Morris in 1977. It is used for finding a specific …