Compute Levenshtein distance as the minimum insertions, deletions, and substitutions needed to transform one string into another.