How can I implement a diff function, such as Stack Overflow\'s question revision history?
diff
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.