This algorithm has been well described in the literature.
Finding the cost of the best alignment, and producing the
aligned sequences can be done with mA mB evaluations of C and
storage for sequences A and B with
lengths mA and mB.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.