mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-25 09:42:16 +08:00
Update
This commit is contained in:
@ -320,7 +320,7 @@ void getNext(int* next, const string& s){
|
||||
|
||||
在文本串s里 找是否出现过模式串t。
|
||||
|
||||
定义两个下表j 指向模式串起始位置,i指向文本串其实位置。
|
||||
定义两个下表j 指向模式串起始位置,i指向文本串起始位置。
|
||||
|
||||
那么j初始值依然为-1,为什么呢? **依然因为next数组里记录的起始位置为-1。**
|
||||
|
||||
|
Reference in New Issue
Block a user