Strings & Automata

KMP, regex engines, and numeric FSMs.


1. KMP precomputes which array?
2. Time complexity of KMP for text length n and pattern length m:
3. In regex-lite, '*' means:
4. Why can backtracking regex engines be slow on some patterns?
5. POSIX regex matching chooses which result when multiple matches exist?
6. In a numeric FSM, which token can appear at most once?
7. Naive substring search worst-case complexity?