Skip to content

Korges/java-kata19-word-chains-korges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kata19 Word Chains by Korga Mateusz

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.

MANUAL SERVICE

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.

Example run:

Type name of option:
CHECK
EXIT
check
Type source word:
dog
Type destination word:
cat
Search took : 3.0 ms
[dog, dot, dat, cat]

Alt text screenshot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages