欢迎来到牛牛题库网 牛牛题库官网
logo

问答题

使用KMP算法求出模式p=”aabcaabbaa”的优化后的next数组。注意:只列出数字,数字之间用一个空格分隔。比如:0 0 0 0 0 0 0 0 0 0
Use KMP algorithm to derive the optimized "next" array for the pattern p = "aabcaabbaa".
Note: Write down the numbers in the next array separated by single space.
For example: 0 0 0 0 0 0 0 0 0 0

【参考答案】

-1 -1 1 0 -1 -1 1 3 -1 -1

点击查看答案
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题