試卷名稱:110年 - 110 國立臺灣大學_碩士班招生考試_部分系所:資料結構與演算法(A)#105777
年份:110年
科目:台大◆資工◆資料結構與演算法(A)
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