This commit is contained in:
youngyangyang04
2020-11-17 12:02:00 +08:00
parent f407ffd3e0
commit db295f4fca
13 changed files with 308 additions and 78 deletions

View File

@ -320,7 +320,7 @@ void getNext(int* next, const string& s){
在文本串s里 找是否出现过模式串t。
定义两个下表j 指向模式串起始位置i指向文本串其实位置。
定义两个下表j 指向模式串起始位置i指向文本串起始位置。
那么j初始值依然为-1为什么呢 **依然因为next数组里记录的起始位置为-1。**