choconlangthang
October 28th, 2004, 02:52 PM
Anyone here knows any site that has good demo + source code on boyer-moore algorithm, please let me know,thanks I've found one, but it seems to fail on the test :
pattern="aba"
text="decbababaegh"
the match should occur at two pos, 5 and 7, but it fails to produce so because when it matches the 1st time, it jumps all three characters.
How do we handle if there are more than one instance of a character in the pattern, the shift value should be same, or different?
pattern="aba"
text="decbababaegh"
the match should occur at two pos, 5 and 7, but it fails to produce so because when it matches the 1st time, it jumps all three characters.
How do we handle if there are more than one instance of a character in the pattern, the shift value should be same, or different?