πŸŽ“How I Study AIHISA
πŸ“–Read
πŸ“„PapersπŸ“°Blogs🎬Courses
πŸ’‘Learn
πŸ›€οΈPathsπŸ“šTopicsπŸ’‘Concepts🎴Shorts
🎯Practice
🧩Problems🎯Prompts🧠Review
Search

Concepts3

Category

πŸ”·Allβˆ‘Mathβš™οΈAlgoπŸ—‚οΈDSπŸ“šTheory

Level

AllBeginnerIntermediateAdvanced
Filtering by:
#overlapping matches
βš™οΈAlgorithmIntermediate

KMP - Prefix Function Applications

The prefix function Ο€ of a string tells, for every position, the length of the longest proper prefix that is also a suffix of the prefix ending there.

#kmp#prefix function#failure function+11
βš™οΈAlgorithmIntermediate

KMP Algorithm

The KMP algorithm finds all occurrences of a pattern in a text in O(n + m) time by never re-checking characters that are already known to match or mismatch.

#kmp algorithm#prefix function#failure function+12
πŸ—‚οΈData StructureAdvanced

Aho-Corasick Automaton

Aho–Corasick is a trie with failure links that finds all occurrences of many patterns in a single pass over the text.

#aho-corasick#multi-pattern matching#trie+12