【发布时间】:2021-11-03 05:30:40
【问题描述】:
val = "one two three four five"
string1 = "you id is one two three"
string2 = "continue to four five"
Expect output: Start span and end span
output1 = 10,22
output2 = 12,20
这里string1和string2中存在一些val的包含。我们需要检测spans
【问题讨论】:
-
你查了吗
Longest Common Substring,网上有很多解决办法