Ad
  • Custom User Avatar

    This problem isn't actually Levenshtein distance because to pass test cases every operation costs exactly one, where for Levensthein for substitution cost will be
    cost = word1[i] == word2[j] ? 0 : 2