mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<p>Given two words, <code>beginWord</code> and <code>endWord</code>, and a dictionary <code>wordList</code>, return <em>all the <strong>shortest transformation sequences</strong> from</em> <code>beginWord</code> <em>to</em> <code>endWord</code><em>, or an empty list if no such sequence exists. Each sequence should be returned as a list of the words </em><code>[beginWord, s<sub>1</sub>, s<sub>2</sub>, ..., s<sub>k</sub>]</code>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log","cog"]
|
||||
@@ -19,7 +19,7 @@
|
||||
"hit" -> "hot" -> "lot" -> "log" -> "cog"
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> beginWord = "hit", endWord = "cog", wordList = ["hot","dot","dog","lot","log"]
|
||||
@@ -33,9 +33,10 @@
|
||||
<ul>
|
||||
<li><code>1 <= beginWord.length <= 5</code></li>
|
||||
<li><code>endWord.length == beginWord.length</code></li>
|
||||
<li><code>1 <= wordList.length <= 1000</code></li>
|
||||
<li><code>1 <= wordList.length <= 500</code></li>
|
||||
<li><code>wordList[i].length == beginWord.length</code></li>
|
||||
<li><code>beginWord</code>, <code>endWord</code>, and <code>wordList[i]</code> consist of lowercase English letters.</li>
|
||||
<li><code>beginWord != endWord</code></li>
|
||||
<li>All the words in <code>wordList</code> are <strong>unique</strong>.</li>
|
||||
<li>The <strong>sum</strong> of all shortest transformation sequences does not exceed <code>10<sup>5</sup></code>.</li>
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user