>_
min_distance.rb
Ruby 4.0
Not run yet

+ 8 hidden

Input
word1 = "lantern"
word2 = "pattern"
Expected
2

Replace the l with p and the first n with t; the a and the ending tern already match.