Loading problem…
Transform beginWord into endWord by changing exactly one letter at a time. Every word after the starting word must belong to wordList, including the target. The starting word does not have to appear in the dictionary.
Return the number of words in the shortest transformation sequence, counting both the start and target. Return 0 when no sequence exists. A direct transformation therefore returns 2.
Example 1:
Example 2:
Example 3: