Search across blog, articles, projects, courses, and community posts
The edit distance between two words is the minimum number of single-letter operations needed to turn the first into the second. An operation is inserting a letter, deleting a letter, or replacing a letter with another.
Input: two lines, one word each.
Output: the edit distance.
Each word has 1 to 200 lowercase letters.
horse ros
3
intention execution
5