Word Ladder II
A hard-tier problem at 27% community acceptance, tagged with Hash Table, String, Backtracking. Reported in interviews at Yelp and 4 others.
Word Ladder II is a hard problem that shows up in assessments at Yelp, Lyft, LinkedIn, Citadel, and TikTok. You're given two words and a dictionary, and you need to find ALL shortest transformation paths from start to end, where each step changes exactly one letter and lands on a valid word. The acceptance rate sits at 27%, meaning most candidates either timeout, return the wrong answer shape, or miss the two-phase approach entirely. If this problem hits your live OA and the BFS-then-backtrack pattern hasn't clicked yet, StealthCoder surfaces a working solution in seconds, invisible to the proctor.
Companies that ask "Word Ladder II"
Word Ladder II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround.
Get StealthCoderThe trap is thinking you can do BFS and backtracking in one pass. You can't. The right move is two phases: first, BFS to find the shortest distance from start to every reachable word, tagging each word with its distance. Then backtrack from the end word, only following edges that decrease distance by exactly 1, collecting all valid paths as you go. Hash Table stores the word graph; String matching finds neighbors; BFS builds the distance map; Backtracking reconstructs paths. Most fail because they either skip BFS and timeout backtracking, or they try to collect paths during BFS and hit exponential overhead. The 27% acceptance rate reflects how many candidates realize too late that path reconstruction requires a second pass. When you're stuck live on this one, StealthCoder hedges the gap between knowing the topics and executing the two-phase solution.
Pattern tags
You know the problem.
Make sure you actually pass it.
Word Ladder II recycles across companies for a reason. It's hard-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Word Ladder II interview FAQ
Why can't I just do BFS and collect paths at the same time?+
Because BFS explores level-by-level, and you'll fork into exponentially many partial paths before knowing which ones lead to valid shortest routes. You need to complete BFS first to compute distances, then backtrack only along edges that go one step closer to the target. Two phases, not one.
Is Word Ladder II still asked at FAANG-style companies?+
Yes. Yelp, Lyft, LinkedIn, Citadel, and TikTok all report it. It's a signature hard problem for testing whether a candidate can combine Hash Table, BFS, and Backtracking. Expect it in phone or online assessment rounds.
What's the difference between Word Ladder I and Word Ladder II?+
Word Ladder I asks for the shortest path length. Word Ladder II asks for all shortest paths. That difference forces you to combine BFS (to find shortest distances) with Backtracking (to enumerate all paths). Word Ladder II is strictly harder.
How do I avoid timeout on the backtracking phase?+
Only backtrack along edges where the neighbor's distance is exactly one less than the current word's distance. This constraint cuts the search space dramatically. Without it, you'll explore invalid branches and timeout. The BFS distance map is your pruning heuristic.
Why do I keep getting wrong answer shape or missing some paths?+
Most likely you're not fully exploring all neighbors during backtracking, or you're constructing the word graph incorrectly. Verify your BFS distance map is complete. In backtracking, check all neighbors that are exactly one step closer. If you're missing paths, the pruning condition is too strict.
Want the actual problem statement? View "Word Ladder II" on LeetCode →