原书出处
Introduction to Algorithms, Fourth Edition
32 第32章 字符串匹配
x array directly, since the ordering of the individual characters gives the suffix array.
Otherwise, recurse to compute the suffix array of P′, treating the ranks in P′ as the input characters in the recursive call. Figure 32.15 shows the suffix array SAP′ for our example. Since the number of metacharacters in P, and hence the length of P′, is approximately 2n/3, this recursive subproblem is smaller than the current problem. F. From SAP′ and the positions in T corresponding to the sample positions, compute the list of positions of the sorted sample suffixes of the original text T. Figure 32.15 shows the list of positions in T of the sorted sample suffixes in our example. 2. The nonsample
suffixes comprise about 1/3 of the suffixes. Using the sorted sample suffixes, sort the n
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter032.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea