Back to DSA sheet

Edit Distance

MediumDynamic Programming
Open on LeetCodeAmazonGoogleMicrosoft

Return the minimum number of insertions, deletions, or substitutions to convert word1 into word2.

Constraints
  • 0 <= word1.length, word2.length <= 500
Sheets
Blind 75NeetCode 150NeetCode 250Striver A2Z
edit-distance.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.