Result of algorithm are snakes. One snake = one char (or more realistic one line) of inserted/deleted + while next equal.
It is a bit memory consuming in case many inserting, deleting? bacause for one char need each snake with many field. Is posssible works on bigger snake = all inserted/deleted in region + next all euals? (but today memory is cheap, this is not critical)