###0

This is Waterman's reformulation of the Needleman-Wunsch algorithm for a simple additive gap function, running in O(n^2). Read the full description in Systematic Dynamic Programming in Bioinformatics.