Word Ladders is Problem 1 of Assignment #2: ADT of the 2011 Spring Quarter CS106B course from Stanford.
A word ladder is a connection from one word to another formed by changing one letter at
a time with the constraint that at each step the sequence of letters still forms a valid word.
For example, here is a word ladder connecting "code" to "data".
code -> core -> care -> dare -> date -> data
That word ladder, however, is not the shortest possible one. Although the words may be
a little less familiar, the following ladder is one step shorter:
code -> cade -> cate -> date -> data
Here is a screenshot of my solution:
You can download my solution code here.
You can also download a runnable .exe file here.
No comments:
Post a Comment