Hello World, We Are Phusion. We provide amazing Ruby & Rails products and services to companies that shape our modern day culture. エンタープライズ向けの高速Ruby on Rails実行環境を提供しているPhusionがEfficient substring searching - Phusion Corporate Blogにおいて、特定の文字列からある文字列を検索をするためのアルゴリズムの比較と、その実装系(C++)の公開を実施している。文字列検索はプログラミングで頻出する処理のひとつであり、プログラミング上の参考になる。 文字列から特定の文字列を検出する場合、全体の文字列長(M)と一致させたい文字列の長さ(N)の積O(M*N)が計算量となる。O(M*N)