Boyer-Moore algorithm
Main features performs the comparisons from right to left; preprocessing phase in O ( m + ) time and space complexity; searching phase in O ( m n ) time complexity; 3 n text character comparisons in the worst case when searching for a non periodic pattern; O ( n / m ) best performance. Description The Boyer-Moore algorithm is considered as the most efficient string-matching algorithm in usual applications. A simplified version of it or the entire algorithm is often implemented in text editors for the «search» and «substitute» commands. The algorithm scans the characters of the pattern from