問題詳情

X The Knuth-Morris-Pratt (KMP) algorithm is an string-matching algorithm. Its core is the pre-fix function. Given a pattern Pl1..m], the prefix function for the pattern P is the function π :{1,2,...,m} →{0,1.... .,m - 1}. What is π[7] for the following pattern P?__ (17)__


(A) 4
(B)5
(C)6
(D) 7

參考答案

答案:[無官方正解]
難度:計算中-1
書單:沒有書單,新增