Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Find the shortest sequence of transformations between two words. By treating words as nodes and single-letter changes as edges, we can use BFS to discover the most efficient path through the vocabulary.
A valid edge exists between two words if they differ by exactly one character. Our dictionary acts as the constraints of the graph.
BFS explores the "ladder" level by level (distance by distance), guaranteeing the first time we find the target, it's via the shortest path.