Container specific search algorithms - Algorithms from the C++ standard library

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 1

  • @ChrisCox-wv7oo
    @ChrisCox-wv7oo Рік тому

    1:40 should check that count != 0, or exists variable should be renamed
    6:30 since c++17, std::search can take as an argument a searcher. boyer_moore_searcher is highly optimized and can find a substring match in best case O(m/n) (worst case O(m*n)), where m is the haystack size, n is the needle size. std::string::find is not guaranteed a time complexity but its compiler specific and generally regarded as O(m*n)
    Thanks for the fantastic series!