原书出处
Introduction to Algorithms, Fourth Edition
32 第32章 字符串匹配
yi denote the concatenation of string y with itself i times. For example, (ab)3 = ababab.
We say that a string x ∈ ∑* has repetition factor r if x = yr for some string y ∈ ∑* and some r > 0. Let ρ(x) denote the largest r such that x has repetition factor r. a. Give an efficient algorithm that takes as input a pattern P[1:m] and computes the value ρ(P[:i]) for i = 1, 2,
…, m. What is the running time of your algorithm? b. For any pattern P[1:m], let ρ*(P) be
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter032.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea