As it stands, BoyerMooreSimple() shifts P by one position if a mismatched text character occurs also in P to the right of the mismatched pattern characters, for example,
abbaabac...1 aabbcbac2 aabbcbac
where the mismatched text character a occurs also in P to the right of the mismatched pattern character c. However, it is clear that it would be more efficient to align the mismatched text character with the same character in P that is closest to the left of the mismatched pattern character, as in
abbaabac...1 aabbcbac2 aabbcbac
where mismatched text character a is aligned with an a to the right of the mismatched pattern character c and closest to c. Generalize this rule and propose an implementation of delta1 for the new rule.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.