dynamic_programming.min_distance_up_bottom

Author : Alexander Pantyukhin Date : October 14, 2022 This is an implementation of the up-bottom approach to find edit distance. The implementation was tested on Leetcode: https://leetcode.com/problems/edit-distance/

Levinstein distance Dynamic Programming: up -> down.

Functions

min_distance_up_bottom(→ int)

Module Contents

dynamic_programming.min_distance_up_bottom.min_distance_up_bottom(word1: str, word2: str) int
>>> min_distance_up_bottom("intention", "execution")
5
>>> min_distance_up_bottom("intention", "")
9
>>> min_distance_up_bottom("", "")
0
>>> min_distance_up_bottom("zooicoarchaeologist", "zoologist")
10