Return the minimum number of single-character insertions, deletions, or replacements needed to transform word1 into word2.
Input / output
word1: string, word2: stringExamples
"horse" to "ros" requires 3 edits."abc" requires 3 insertions.Constraints
0 <= word1.length, word2.length <= 500Follow-up How can you reduce the dynamic-programming memory from quadratic to linear?