Logo

DiaryWikiProfile

文字列

Z-Algorithm

各iiiについてSとS[i..]の最長共通接頭辞をO(N)で求めるアルゴリズム

Knuth-Morris-Pratt法

まず文字列のBorder配列を求める

Border配列を愚直に求めると、O(N2)O(N^2)O(N2)の時間がかかってしまう

Boyer-Moore法

参考文献

文字列の辞典

Boyer–Moore string-search algorithm

On improving the worst case running time of the Boyer-Moore string matching algorithm

  1. procon

    1. combinatorics
    2. convex-hull-trick
    3. debug
    4. dynamic-programming
    5. fft
    6. game
    7. greedy-algorithm
    8. kitamasa-method
    9. matching
    10. mind
    11. misc
    12. rounding-function
    13. string
  2. programming

    1. functor_applicative_monad
    2. subtyping
  3. web

    1. bidirectional
    2. css
    3. docker
ここに著作権などについて書く