In the case of a mismatch,
:
Look for the occurrence of mismatch character in the pattern, such that P[k]=T[s+j].
Three cases:
k=0: The character occurs nowhere in the pattern
aaac........
aaaaaa
aaaaaa
k<j: The rightmost occurrence of the bad character is to the left of j
aaacaa........ acaaaa acaaaa
k>j: The rightmost occurrence of the bad character is to the right of j
..aaacac........ aaaaac aaaaac