Dynamic programming - tabular computation
Allocate table D[0..m,0..n]
Fill in row 0 and column 0
Fill in remaining elements, for example row-wise or column-wise
D(m,n) gives edit distance S1,S2.
Find alignment/edit transcript by tracing back from m,n to 0,0