Reported June 2024
Adobebreadth first search

Determine the Edit Distance in a Word Ladder

Reported by candidates from Adobe's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Adobe OA. Under 2s to a working solution.
Founder's read

Adobe's Word Ladder problem from June 2024 is a classic dynamic programming gauntlet that catches candidates off guard because it feels like a graph problem at first. You're building a ladder of words where each step changes exactly one letter, and you need to find the shortest path. The trick is recognizing this is really about edit distance and BFS layered over a vocabulary set. If you blank on the graph traversal during the live OA, StealthCoder will feed you the pattern instantly so you don't crater on approach.

Pattern and pitfall

The algorithmic core is BFS to explore all one-letter transformations from a start word toward an end word, using a given word list. Many candidates overthink it as a pure DP problem, but the real win is BFS with state compression. You track visited words to avoid cycles, and at each level you generate neighbors by swapping each character position. The edit distance concept matters because you're counting steps, not computing Levenshtein directly. Common pit: trying to precompute all word pairs (too slow). The hedge: during the OA, if you freeze on the neighbor generation logic, StealthCoder unblocks you with the exact iteration pattern so you stay on schedule.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Determine the Edit Distance in a Word Ladder cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ Practice the LeetCode equivalent

This OA pattern shows up on LeetCode as word ladder. If you have time before the OA, drill that.

⏵ The honest play

You've seen the question. Make sure you actually pass Adobe's OA.

Adobe reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Determine the Edit Distance in a Word Ladder FAQ

Is this really about edit distance or word transformation?+

It's word transformation via one-letter swaps. Edit distance (Levenshtein) is conceptually related but not the direct algorithm. The 'edit distance in the ladder' phrase means the number of steps. Use BFS, not pure DP recurrence. The ladder itself is the shortest path.

What's the trick Adobe is testing?+

Graph traversal disguised as string work. They want to see if you can model the problem (words as nodes, edges between one-letter-apart words) and pick BFS over recursion. Handling the neighbor generation efficiently, without generating all English words, is the real checkpoint.

How do I generate neighbors without timing out?+

For each position in the word, try all 26 letters. Check if the result exists in the word list. Don't try to precompute all pairs. This is O(N*L*26) where N is word list size and L is word length. Fast enough if you iterate smartly.

Should I use recursion with memoization instead of BFS?+

BFS is cleaner and faster for shortest path. Memoization (DP) works but forces you to explore both directions or use bidirectional search to avoid timeout. BFS is the standard Adobe expects. One queue, one visited set, done.

What if the end word isn't in the word list?+

Return 0 or negative one (depends on the exact spec). Most versions require end word to be in the list. Read the problem statement carefully during the OA. If it's ambiguous, ask for clarification or handle both cases. Adobe respects defensive coding.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Adobe.

OA at Adobe?
Invisible during screen share
Get it