Practice
Learn
← Quit
0 / 0 correct
Algorithms
Hard
1 of 398
How does KMP achieve O(n + m) string matching?
A
A failure (prefix) function tells how far to shift the pattern after a mismatch without re-examining text characters
B
It hashes all substrings
C
It compares from the end of the pattern only
D
It sorts the text