Dsa
Graphs Dfs
Easy
Word Ladder Length
Given a start word, an end word, and a dictionary of words, find the length of the shortest transformation sequence from the start word to the end word, changing only one letter at a time. Each transformed word must exist in the dictionary. If there is no such transformation, return 0.
Example:
Input:
hit
cog
dot
hot
log
cog
Output:
5
Key concepts
graphsdfsword-ladder
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now