1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-18 11:36:48 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

更新国内版力扣题目描述变更

This commit is contained in:
2022-05-02 23:42:43 +08:00
parent 74598d1cf8
commit 7ea03594b3
198 changed files with 11378 additions and 11118 deletions

View File

@@ -1,27 +1,27 @@
<p>In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom (i.e., each disk sits on top of an even larger one). You have the following constraints:</p>
<p>(1) Only one disk can be moved at a time.<br />
(2) A disk is slid off the top of one tower onto another tower.<br />
(3) A disk cannot be placed on top of a smaller disk.</p>
<p>Write a program to move the disks from the first tower to the last using stacks.</p>
<p><strong>Example1:</strong></p>
<pre>
<strong> Input</strong>: A = [2, 1, 0], B = [], C = []
<strong> Output</strong>: C = [2, 1, 0]
</pre>
<p><strong>Example2:</strong></p>
<pre>
<strong> Input</strong>: A = [1, 0], B = [], C = []
<strong> Output</strong>: C = [1, 0]
</pre>
<p><strong>Note:</strong></p>
<ol>
<li><code>A.length &lt;= 14</code></li>
</ol>
<p>In the classic problem of the Towers of Hanoi, you have 3 towers and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom (i.e., each disk sits on top of an even larger one). You have the following constraints:</p>
<p>(1) Only one disk can be moved at a time.<br />
(2) A disk is slid off the top of one tower onto another tower.<br />
(3) A disk cannot be placed on top of a smaller disk.</p>
<p>Write a program to move the disks from the first tower to the last using stacks.</p>
<p><strong>Example1:</strong></p>
<pre>
<strong> Input</strong>: A = [2, 1, 0], B = [], C = []
<strong> Output</strong>: C = [2, 1, 0]
</pre>