UVa 429

From Algorithmist
Jump to navigation Jump to search

Category: Graph (BFS)

Hints: This is a simple BFS problem. Consider every word as a vertex. Two vertices are adjacent if their length is equal and they differ in only one letter. Then just run BFS.

Reference: BFS – Introduction To Algorithms – CLRS (2nd edition) Page 531 – 538