Define as the minimum operations to convert A[0..i-1] to B[0..j-1]. Base cases differ from LCS: : Converting empty string to B[0..j] requires insertions. : Converting A[0..i] to empty string requires deletions.
These non-zero base cases reflect that converting to/from empty strings has a cost. Take time to work through examples. The pattern becomes clearer with practice.