Edit distance
Your task
Return the Levenshtein edit distance between two strings a and b: the minimum number of single-character insertions, deletions, or substitutions needed to turn a into b. For example, turning "kitten" into "sitting" takes 3 edits. Either string may be empty. Strings can be up to a few thousand characters, so use O(len(a)*len(b)) time and try to keep memory to O(min(len(a), len(b))).
Examples
edit_distance(a: str, b: str) -> intExample 1
Input
edit_distance("kitten", "sitting")Output
3