Efficient Algorithm for String Concatenation with Overlap

前端 未结 12 2227
轻奢々
轻奢々 2020-12-02 21:32

We need to combine 3 columns in a database by concatenation. However, the 3 columns may contain overlapping parts and the parts should not be duplicated. For example,

<
12条回答
  •  一整个雨季
    2020-12-02 21:49

    This problem seems like a variation of the longest common sub-sequence problem, which can be solved via dynamic programming.

    http://www.algorithmist.com/index.php/Longest_Common_Subsequence

提交回复
热议问题