How do document diff algorithms work?
问题 I want to implement word document differ, what algorithms does it requires to implement? 回答1: The Most optimize solution of lcs is O(ND) Myer 's algorithm , and here is an algorithmic approach which I used to implement to diff office 2007 documents. Link to algorithm paper 回答2: Well, generally speaking, diff 'ing is usually solved by the Longest common subsequence problem. Also see the "Algorithm" section of the Wikipedia article on Diff: The operation of diff is based on solving the longest