Skip to content

Latest commit

 

History

History
executable file
·
22 lines (10 loc) · 548 Bytes

Levenshtein_Distance.md

File metadata and controls

executable file
·
22 lines (10 loc) · 548 Bytes

Levenshtein Distance

Problem Statement

Write a function that takes in two strings and returns the minimum number of edit operations that need to be performed on the rst string to obtain the second string. There are three edit operations: insertion of a character, deletion of a character, and substitution of a character for another.

Sample input:"abc","yabd" Sample output: 2 (insert"y"; substitute "c"for "d")

Explanation

We can use a Stack here

Solution

Check this Python code.