设主串的长度为 n, 子串的长度为 m, 则简单的模式匹配算法的时间复杂度为(), KMP 算法的时间复杂度为()。
A. O(m) B.O(n) C.O( mn) D.O(m + n)
[tag_link]
正确答案: