Word Ladder
Hard
Graphs
Given beginWord, endWord and a dictionary, print the number of words in the shortest sequence from beginWord to endWord where each step changes exactly one letter and each intermediate word is in the dictionary. Print 0 if no sequence exists.
Constraints
1 <= len(word) <= 10 1 <= d <= 5000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.