Medium
Given two strings word1 and word2, return the minimum number of operations (insert, delete, or replace a character) to convert word1 into word2.
Input: word1 = "horse", word2 = "ros" Output: 3
Input: word1 = "intention", word2 = "execution" Output: 5