This program accepts two words and builds a chain of words between the initial two words. Each successive entry in the chain only differs by one character (i.e., a Levenshtein distance of 1).
For example, you can get from "cat" to "bird" using the following chain: cat -> bat -> bit -> bid -> bird
Unlike Kata19, the words in this program can vary in length.
- At the command prompt, type "ruby wordchain.rb"
- Enter the first word in the word chain
- Enter the second word in the word chain
- Wait (hopefully not too long!)
- Voila!