http://qs1969.pair.com?node_id=11138463


in reply to Re: Suffix-prefix matching done right
in thread Suffix-prefix matching done right

then just loop until it crosses a threshold

then with A,B,X of OP's example, the correct result will be missed

  • Comment on Re^2: Suffix-prefix matching done right

Replies are listed 'Best First'.
Re^3: Suffix-prefix matching done right
by NERDVANA (Friar) on Nov 05, 2021 at 12:32 UTC
    Ah, True. In a different example, "abcdef" and "abcdef" would iteratively have an edit distance of 1, 2, 3, 4, 2, and then suddenly 0. So you would need to check all lengths.