← Questions

Word ladder

0
AmazonCodingLast asked Dec 2025

Given a start word, an end word and a word list, find the length of the shortest sequence from start to end in which each step changes exactly one letter and every word after the start is in the list. Return 0 if there is none. Explain how you find neighbours quickly.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding