A “word ladder” is a sequence of words, all of the same length, where each word after the first one differs from its predecessor by exactly one letter. A “word ladder” is a sequence of words, all of the same length, where each word after the first one differs from its predecessor by exactly one letter.
input:
Enter file name with the words: word5.txt
Number of vertices: xxx.
Number of edges: xxx.
Number of components: xxx.
base output:
Largest component: xxx words.
Largest degree: xxx at xxx.
command i:
Command (d/i/q)? i
Enter source word (5 letters): graph
Degree of graph is 2.
Neighborhood of graph:
grape
grapy
Eccentricity of graph: 24.
command d:
Command (d/i/q)? d
Enter source word: Texas
Enter destination word: Maine
The path from Texas to Maine has 13 steps:
Texas
Texan
Teman
beman
bemat
berat
beray
berry
barry
harry
hairy
haire
haine
Maine
quit:
Command (d/i/q)? q
Thank you for playing!