the boyer-moore algorithm searches for occurrences of in by performing explicit character comparisons at different alignments. instead of a brute-force search of all alignments (of which there are ), boyer-moore uses information gained by preprocessing to skip as many alignments as possible.