Skip to content
We areTOP 1%

Word Ladder

HardLeetCodeGraphs: BFS & DFS
Solve on LeetCode(opens in a new tab)
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews
Approach hintTry it first, then reveal

Run a BFS from the begin word. Generate neighbours by changing each position to every other letter and checking a hash set of unused words; the layer at which the end word appears gives the answer.

More in Graphs: BFS & DFS

Graphs: BFS & DFS questions
#ProblemPlatformDifficultyOpen1st1st Visit2nd2nd VisitRevRevise
1Flood FillLeetCodeEasy Solve Flood Fill on LeetCode (opens in a new tab)
2The LakesCodeforcesEasy 1100Solve The Lakes on Codeforces (opens in a new tab)
3Ice SkatingCodeforcesEasy 1200Solve Ice Skating on Codeforces (opens in a new tab)
4Number of IslandsLeetCodeMedium Solve Number of Islands on LeetCode (opens in a new tab)
5Rotting OrangesLeetCodeMedium Solve Rotting Oranges on LeetCode (opens in a new tab)
601 MatrixLeetCodeMedium Solve 01 Matrix on LeetCode (opens in a new tab)
7Surrounded RegionsLeetCodeMedium Solve Surrounded Regions on LeetCode (opens in a new tab)
8Clone GraphLeetCodeMedium Solve Clone Graph on LeetCode (opens in a new tab)
9Is Graph Bipartite?LeetCodeMedium Solve Is Graph Bipartite? on LeetCode (opens in a new tab)
10RumorCodeforcesMedium 1300Solve Rumor on Codeforces (opens in a new tab)
11Mahmoud and Ehab and the bipartitenessCodeforcesMedium 1300Solve Mahmoud and Ehab and the bipartiteness on Codeforces (opens in a new tab)
12Arrow PathCodeforcesMedium 1300Solve Arrow Path on Codeforces (opens in a new tab)
13Two ButtonsCodeforcesMedium 1400Solve Two Buttons on Codeforces (opens in a new tab)
14Pacific Atlantic Water FlowLeetCodeMedium Solve Pacific Atlantic Water Flow on LeetCode (opens in a new tab)
15Kefa and ParkCodeforcesMedium 1500Solve Kefa and Park on Codeforces (opens in a new tab)
16Fox And Two DotsCodeforcesMedium 1500Solve Fox And Two Dots on Codeforces (opens in a new tab)
17Word LadderLeetCodeHard Solve Word Ladder on LeetCode (opens in a new tab)

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account