Content deleted Content added
No edit summary |
No edit summary |
||
Line 2:
This algorithm uses the fact that after finding the first mismatch, we already know the characters compared before. We therefore will have to compare the pattern to itself to determine how many positions we have to move to the left.
INPUT: Text T[0,n-1], Pattern P[0,m-1]
Output alle matches of P in T
Line 23 ⟶ 22:
}
Input: Pattern P
Line 39 ⟶ 35:
next[q] = l;
}
|