Search⌘ K
AI Features

Word Ladder

Explore how to determine the shortest transformation sequence from a start word to a target word by changing one letter at a time. Understand the problem constraints and implement a solution using breadth-first search to efficiently traverse the word graph. This lesson helps you apply tree BFS techniques in coding interviews.

Statement

Given two words, src and dest, and a list, words, return the number of words in the shortest transformation sequence from src to dest. If no such sequence can be formed, return 00.

A transformation sequence is a sequence of words ((src \to word1word_1 \to ...