1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/训练计划 IV [he-bing-liang-ge-pai-xu-de-lian-biao-lcof].html
2023-12-09 18:53:53 +08:00

36 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定两个以 <strong>有序链表</strong> 形式记录的训练计划 <code>l1</code><code>l2</code>,分别记录了两套核心肌群训练项目编号,请合并这两个训练计划,按训练项目编号 <strong>升序</strong> 记录于链表并返回。</p>
<p><strong>注意</strong>:新链表是通过拼接给定的两个链表的所有节点组成的。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre>
<strong>输入:</strong>l1 = [1,2,4], l2 = [1,3,4]
<strong>输出:</strong>[1,1,2,3,4,4]</pre>
<p><strong>示例 2</strong></p>
<pre>
<strong>输入:</strong>l1 = [], l2 = []
<strong>输出:</strong>[]</pre>
<p><strong>示例 3</strong></p>
<pre>
<strong>输入:</strong>l1 = [], l2 = [0]
<strong>输出:</strong>[0]</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<p><code>0 &lt;= 链表长度 &lt;= 1000</code></p>
<p>&nbsp;</p>
<p>注意:本题与主站 21 题相同:<a href="https://leetcode-cn.com/problems/merge-two-sorted-lists/">https://leetcode-cn.com/problems/merge-two-sorted-lists/</a></p>
<p>&nbsp;</p>