An implementation of the classic O(ND) diff algorithm