In this challenge you will write a program that takes two newline-separated strings, s1 (the first line) and s2 (the second line), as input (STDIN or closest). You can assume that the length of s1 will always be smaller than 30 and bigger than the length of s2. The program should then output each step in the levenshtein distance from s1 to s2.
To clarify what each step in the levenshtein distance means, the program will print n strings, where n is the levenshtein distance between s1 and s2, and the levenshtein distance between two adjacent strings will always be one. The order doesn't matter. The output should be newline-separated and not include s1, only the in-betweens and s2. The program should also run in under one minute on a modern computer.
rogramming Cogramming Coramming Coamming Codmming Codeming Codeging Codegong Codegolg Codegolf
uestions Aestions Anstions Ansions Answons Answens Answers
Sturday Surday Sunday
Here is a link to a python script that prints out the distance and the steps.
- No use of the internet
- Standard loopholes apply
This is code-golf so keep you code short; shortest code wins!