Your question is Word Ladder 2 Implementation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
OfferUp may need to find the shortest sequence of valid keyword transformations between two search terms. Given a beginWord, an endWord, and a dictionary, return every shortest transformation sequence.
A transformation changes exactly one character, and every intermediate word must appear in wordList. The first and last words are included in each returned sequence. If no transformation exists, return an empty list.
Implement find_ladders(beginWord, endWord, wordList).
beginWord: a lowercase string.endWord: a lowercase string with the same length as beginWord.wordList: a list of lowercase strings of the same length.beginWord to endWord.Use an efficient representation for finding words that differ at exactly one position. A path cannot reuse a word.
def find_ladders(beginWord, endWord, wordList):