Enumerate all shortest transformation sequences without memory explosion: Machine 1 (BFS) builds a layer graph with end-of-level visited pruning. Machine 2 (DFS) reconstructs all valid path sequences.
"Attempting to carry full path lists inside the BFS queue consumes $O(N \cdot L \cdot b^d)$ space, causing Memory Limit Exceeded (MLE) on LeetCode."
"BFS builds a directed layer DAG (parent map Map<String, List<String>>) tracking only directed parent-to-child edges."
"Crucially, words discovered in level $k$ cannot be deleted immediately! They must remain available until the entire level finishes, so multiple parents can adopt the same child."
"Once BFS terminates at the first layer containing endWord, a clean DFS backtracking recursion walks the DAG from beginWord to endWord to enumerate all optimal paths."