Word Ladder II — All Shortest Sequences
Asked at Amazon · Coding Questions · Difficulty: Hard
Given `begin_word`, `end_word`, and a `word_list`, return all shortest transformation sequences from `begin_word` to `end_word`, where each step changes exactly one letter and every intermediate word is in `word_list`. Return the list of sequences (the reference returns them sorted); empty if none.
Loading the problem…