R - Longest common substring

后端 未结 4 1866
天命终不由人
天命终不由人 2020-12-09 06:17

Does anyone know of an R package that solves the longest common substring problem? I am looking for something fast that could work on vectors.

4条回答
  •  攒了一身酷
    2020-12-09 06:39

    I don't know R, but I used to implement Hirschberg's algorithm which is fast and don't consume too much space.

    As I remember it is only 2 or 3 recursively called short functions.

    Here is a link: http://wordaligned.org/articles/longest-common-subsequence

    So don't hesitate to implement it in R, it worths the effort since it is a very interesting algorithm.

提交回复
热议问题