How to realize a diff function?

后端 未结 5 2030
耶瑟儿~
耶瑟儿~ 2021-02-04 22:49

How can I implement a diff function, such as Stack Overflow\'s question revision history?

5条回答
  •  青春惊慌失措
    2021-02-04 23:33

    Most algorithms are based on LCS: Longest common subsequence. It isn't obvious to implement it in an efficient way. You will probably find various implementations on the Net, for various languages.

提交回复
热议问题