You are given two strings word1 and word2 of equal length.
You can partition word1 into one or more non empty contiguous substrings. For each substring, you can perform any number of the following operations:
Type
Type
Type
Each operation on a substring counts as
Return the minimum total number of operations required to transform word1 into word2.
Constraints:
word1.length word2.length
word1 and word2 consist only of lowercase English letters.
You are given two strings word1 and word2 of equal length.
You can partition word1 into one or more non empty contiguous substrings. For each substring, you can perform any number of the following operations:
Type
Type
Type
Each operation on a substring counts as
Return the minimum total number of operations required to transform word1 into word2.
Constraints:
word1.length word2.length
word1 and word2 consist only of lowercase English letters.