NeetCode #623LC-127HardGraphsNC 150NC 250
← Back to All Problems

#623 · #127 · Word Ladder(单词接龙)

📌 Problem Statement & Constraints

A transformation sequence from beginWord to endWord changes one letter at a time, and every intermediate word must be in wordList. Return the length of the shortest sequence (counting both endpoints), or 0 if none exists. Constraints: 1 <= beginWord.length <= 10, 1 <= wordList.length <= 5000, all words have the same length and are distinct.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!