Word Ladder
Given two words beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord (changing one letter at a time).
Word Ladder

Given two words beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord (changing one letter at a time).

Example 1:
Input: {"beginWord":"hit","endWord":"cog","wordList":["hot","dot","dog","lot","log","cog"]}
Output: 5
Input
arr ={"beginWord":"hit","endWord":"cog","wordList":["hot","dot","dog","lot","log","cog"]}

Start BFS

Start

hit

Target

cog

Processing (Level 1)

hit

Word Dictionary
hot
dot
dog
lot
log
cog
BFS Queue

hit (L1)

Level: 1
Visited: 1
Queue: 1
Current
Visited
Target
Variables
No variables to display
DepthFunction Call
Stack empty
0/6