1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-27 10:40:26 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/图书整理 I [cong-wei-dao-tou-da-yin-lian-biao-lcof].html

18 lines
546 B
HTML
Raw Normal View History

2023-12-09 18:53:53 +08:00
<p>书店店员有一张链表形式的书单,每个节点代表一本书,节点中的值表示书的编号。为更方便整理书架,店员需要将书单倒过来排列,就可以从最后一本书开始整理,逐一将书放回到书架上。请倒序返回这个书单链表。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>head = [3,6,4,1]
<strong>输出:</strong>[1,4,6,3]
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<p><code>0 &lt;= 链表长度 &lt;= 10000</code></p>