将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。
示例:
输入:1->2->4, 1->3->4
输出:1->1->2->3->4->4
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/merge-two-sorted-lists
版权归领扣网络所有。商业转载,请联系官方授权。非商业性转载,请注明出处。
[En]
The copyright belongs to the collar and buckle network. For commercial reprint, please contact official authorization. For non-commercial reprint, please indicate the source.
```csharp
/**
* Definition for singly-linked list.
- public class ListNode {
- public int val;
- public ListNode next;
- public ListNode(int val=0, ListNode next=null) {
- this.val = val;