Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 607 Bytes

File metadata and controls

20 lines (11 loc) · 607 Bytes

Word Chain

Possible solution to the exercise proposed in the Aberdeen Python dojo of 26th November 2014.

Goal

Connect two words with a chain of words. All words must be valid and there must be only one character different between each neighbour.

For example: cat - cot - cog - dog

About this solution

This is not the most efficient way to find a word chain and it's neither a way to find the shortest path. But it's one of the most simple solutions.

You can improve it for example using known algorithms to find shorter paths, like A*, or some other heuristics.