Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2 (insert, delete, replace).
2D Dynamic Programming
We build a 2D matrix where dp[i][j] represents the minimum operations to convert word1[i:] to word2[j:]. When characters don't match, we choose the minimum of three possible future states: Insert, Delete, or Replace.