Converting empty A to [1..]: Insert all characters. . Converting [1..] to empty : Delete all characters. .
Both empty: . These base cases fill the first row and column. Base cases are where the recursion stops. They handle the simplest possible inputs directly, without making recursive calls. Every recursive function needs at least one base case, or it will recurse forever and crash.