Edit Distance

Hard · Dynamic Programming · about 30 minutes

Asked at Adobe, Amazon, Apple, Google.

Given two strings, return the minimum number of single-character insertions, deletions or substitutions needed to convert one into the other.

Related guides