Edit Distance
Problem Statement
Given two strings, find the minimum number of operations to convert one into the other. You can:
- Insert a character
- Delete a character
- Replace a character
word1 = "horse" word2 = "ros" Answer: 3 operations horse → rorse (replace 'h' with 'r') rorse → rose (delete 'r') rose → ros (delete 'e')