There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies. C.A.R. Hoare

Word Ladder

Language Java | Level Intermediate | Category Data structure | September 9, 2015 9:35 am


Data structure Description

Word ladder puzzle begins with two words and to solve the puzzle one must find a chain of other words to link the two, in which two adjacent words differ by one letter.

Write a program to implement Word Ladder using set?


Output

   					 

Find the ladder 'fool' and 'sage'
fool -> pool -> poll -> pall -> pale -> sale -> sage -> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Find the ladder 'cold' and 'warm'
cold -> cord -> card -> ward -> warm ->

				    

Comments


No comments available!

Please login to add comments.