This is a tool for finding the differences between two text files and in particular finding what parts have been edited, deleted or added. It implements one of the algorithms for finding the Longest Common Subsequence between to data sources.
You can see a demo at: http://www.bodurov.com/JavaScriptDiff/
The main idea of this algorithm is to build a matrix with rows – future state, and columns – previous state. This matrix will consist of squares incorporated one into the other as steps in a stairway. The path of following those steps from the top left corner to the right bottom corner determines the actual graph. Moves to the right are deletes, to the bottom – inserts. Inserts followed by deletes are changes.