So I\'ve been working on a wiki type site. What I\'m trying to decide on is what the best algorithm for merging an article that is simultaneously being edited by two users.
There's a formal analysis of the diff3 algorithm, with pseudocode, in this paper: http://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf
It is titled "A Formal Investigation of Diff3" and written by Sanjeev Khanna, Keshav Kunal, and Benjamin C. Pierce from Yahoo.