What is linux diff -y algorithm?

Led by Wikipedia claims diff implements the longest common subsequence.

It cannot be so. Diff, at least in -y mode, has three types of reports: add, delete, and replace. LCS has no concept of "substitute."

What is diff algorithm? I have a reason not to believe that this is Levenshteinโ€™s distance, but I could have analyzed it incorrectly.

+4
source share
1 answer

This answer (from ioplex ) says that GNU diff implements Eugene Myers' O (ND) diff algorithm.

+2
source

Source: https://habr.com/ru/post/1300994/


All Articles