mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
批量更新数据
This commit is contained in:
@@ -8,32 +8,31 @@
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> numCourses = 2, prerequisites = [[1,0]]
|
||||
<strong>输出: </strong><code>[0,1]</code>
|
||||
<strong>解释:</strong> 总共有 2 门课程。要学习课程 1,你需要先完成课程 0。因此,正确的课程顺序为 <code>[0,1] 。</code></pre>
|
||||
<strong>输出: </strong>[0,1]
|
||||
<strong>解释:</strong> 总共有 2 门课程。要学习课程 1,你需要先完成课程 0。因此,正确的课程顺序为 [0,1]。</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> numCourses = 4, prerequisites = [[1,0],[2,0],[3,1],[3,2]]
|
||||
<strong>输出: </strong><code>[0,1,2,3] or [0,2,1,3]</code>
|
||||
<strong>解释:</strong> 总共有 4 门课程。要学习课程 3,你应该先完成课程 1 和课程 2。并且课程 1 和课程 2 都应该排在课程 0 之后。
|
||||
因此,一个正确的课程顺序是 <code>[0,1,2,3]</code> 。另一个正确的排序是 <code>[0,2,1,3]</code> 。
|
||||
<strong>输出: </strong>[0,1,2,3] or [0,2,1,3]
|
||||
<strong>解释:</strong> 总共有 4 门课程。要学习课程 3,你应该先完成课程 1 和课程 2。并且课程 1 和课程 2 都应该排在课程 0 之后。因此,一个正确的课程顺序是 [0,1,2,3]。另一个正确的排序是 [0,2,1,3]。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 3:</strong></p>
|
||||
<p><strong>示例 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> numCourses = 1, prerequisites = []
|
||||
<strong>输出: </strong><code>[0]</code>
|
||||
<strong>输出: </strong>[0]
|
||||
<strong>解释:</strong> 总共 1 门课,直接修第一门课就可。</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>提示:</strong></p>
|
||||
<p><strong>提示:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>1 <= numCourses <= 2000</code></li>
|
||||
|
||||
Reference in New Issue
Block a user