Your question is Shortest Transformation Sequence Length. 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.
Given a begin_word string, an end_word string, and a list of unique lowercase strings word_list, return the length of the shortest transformation sequence from begin_word to end_word. A valid transformation changes exactly one character at a time, and every intermediate word must exist in word_list. Return 0 if no such sequence exists.
def ladder_length(begin_word, end_word, word_list):