You are given two strings, word1 and word2.
Your task is to determine the minimum number of operations required to transform word1 into word2.
Note that:
word1:
Return the minimum count of operations as an integer.
word1 = "cat"
word2 = "cut"
1
word1 = "sunday"
word2 = "saturday"
3
word1 = "same"
word2 = "same"
0
Both strings are already identical, no edits needed.
word1 = "computer"
word2 = "science"
7
computer -> science
Replace or delete most letters — minimal common overlap ('e') gives distance of 8.
word1 = "cat"
word2 = "cut"
1