Edit Distance
Return the minimum number of single-character insertions, deletions or substitutions needed to turn a into b (the Levenshtein distance).
Examples
EXAMPLE WALKTHROUGHthree edits
A guided view of the published example, not a trace of your code.
INPUT
["horse","ros"]TASKedit_distance()
EXPECTED OUTPUT
3Start with the input values shown in this example.
Example 1 of 3
Input: a = "horse", b = "ros"
Output: 3
Explanation: three edits
Input: a = "intention", b = "execution"
Output: 5
Explanation: five edits
Input: a = "", b = "abc"
Output: 3
Explanation: from empty
Hint 1
D[i][0] = i and D[0][j] = j.
Hint 2
You only need two rows of the table at a time.