A program that finds connection between two words given from dictionary. If connection exists returns the shortest possible chain between them. Each word in chain can differ from the previous word by just one letter. Words are placed in graph-based structure. For finding connection I used breadth first search algorithm with additional HashMap to track path.
Run 'WordChains.java', then:
- enter 'check' to find the shortest chain, then enter two words. They can not be the same. Must be same length.
- enter 'exit' to shut down app
If program finds connection in graph, returns shortest possible path, from first to last and shows operation time in mili seconds.
Type name of option:
CHECK
EXIT
check
Type source word:
dog
Type destination word:
cat
Search took : 3.0 ms
[dog, dot, dat, cat]
