Skip to content

vishmitha1/Boyer-Moore-Horspool-Algorithm

Repository files navigation

Boyer-Moore-Horspool-Algorithm

Readme

About the inputFiles.

• In this code patterns and texts get as external txt files.

• When this code runs it ask pattern file and text file as a inputs from the user.

• You should be able to give the correct file names as a input.

• As an example, the pattern which saved in “pattern1.txt” and text file which save in “text1.txt “.

• When code ask file names then you should give the right filename that is pattern1.txt and text1.txt .

About the outputFiles

• Also Output file name take from user.

• You can give any meaning full name to it.

• You must enter filename and its’s extension.

• As an example, if you want to save your output in file name output1 you must enter “output1.txt” as an input.

bm2 out

How its Work

create hpbc

Calculate Next Shifting Position: Position = position + Hpbc[text[position + (lengthofpattern -1 ) ]]

Hits