What we see depends mainly on what we look for. John Lubbock We do not see things as they are, we see things as we are. Anais Nin Gestalt Diffing algorithm in Java Intro When it comes down to diffing or LCS usually story ends with Myers algorithm. It is idea to create BitMatrix (or IntMatrix) of similarities between two strings and then to approach to a problem from graph point, and find the shortest path of changes between two arrays. It sounds as a great solution, and it is, but in reality it has few drawbacks. It is algorithm that gives great results most of the time but it is a slow algorithm for some obvious cases, if strings are equal, or very similar. You create whole matrix but for your solution not all values from matrix are needed. It involves one more algorithm, finding the shortest path in it self. Then improvements of Myers algorithm came, like to check on start are strings are equals, to check for same prefix or suffix, to run snake chase from both...
On that fatal night when my faith towards Lord betrays me when finally all curses of my enemies gets me down and my destiny turns its back on me on that night I will walk into a ninth circle of hell so easily like the devil him self is my brother i will descend shining brightly like a shooting falling star little-bit lost like an old worn-out jacket with two false faces that night you will wait for me with your tired soul it is so hard to wait for false promises of crooked man that is fucking hard and it's so easy to forget everything with one bottle of rum and to live just for tomorrow and another bottle and to die all alone, my love on that night when I leave forever, when I say my farewell on that night only two women will wake up one would be my beloved mother and she will cry second would be you, and you will curse me