From Jason Turner
Watch on YouTube

Summary

In this episode, Jason explores C++17's additions to the standard search algorithms: the Boyer-Moore searcher and Boyer-Moore-Horspool searcher. After first explaining how the traditional std::search algorithm works with iterators to find subsequences, he demonstrates how these new optimized search algorithms can be more efficient for string searching operations. Jason highlights that while the default search algorithm has a complexity of O(S*N), the Boyer-Moore variants can significantly reduce this in many cases, particularly when searching for patterns that don't exist in the text, where complexity improves to O(N+M).

Resources

Tags