Algorithm · Salesforce · Hard
You are given a starting word beginWord, a target word endWord, and a dictionary of valid words wordList. In a single move, you may change exactly one letter of the current word to any other lowercase letter, provided the resulting word appears in wordList. The transformation may be repeated, and the goal is to reach endWord using the fewest possible words in the sequence. Formally, a transformation sequence is a sequence of words where the first word is beginWord, each…
Checking your access…