LeetCode 72: Edit distance
Today, let’s look at LeetCode problem 72: Edit distance. The instructions are as follows: Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character Delete a character Replace a character Let’s dive in! The Wagner-Fischer algorithm There are several types of edit distance. This LeetCode problem defines it as the Levenshtein distance. The most common algorithm to compute it is the Wagner-Fischer algorithm. ...