68. Edit Distance
MediumDynamic Programming
Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. Operations: Insert, Delete, Replace a character.
Examples
Input: horse ros
Output: 3
Explanation: Public test case for Edit Distance
Constraints
- 0 <= word1.length, word2.length <= 500
Loading...
Run checks all cases above. Submit evaluates all test cases.