Search⌘ K
AI Features

Word Ladder

Understand how to solve the Word Ladder problem by applying Tree Breadth-First Search. Learn to identify the shortest sequence of word transformations where each step changes only one character, and practice this pattern to improve your approach for 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 ...