Equalize Strings by Adding or Removing Characters at Ends
Trim both strings down to a shared contiguous piece; the table of matching runs finds the longest one and the cost follows.
Trim both strings down to a shared contiguous piece; the table of matching runs finds the longest one and the cost follows.