题目描述: 将两个有序链表合并为一个新的有序链表并返回.新链表是通过拼接给定的两个链表的所有节点组成的. 示例: 输入:1->2->4, 1->3->4输出:1->1->2->3->4->4 方法一:拼接两个链表 代码实现: package com.company; public class Main { public static void main(String[] args) { ListNode node1 = new ListNode(1);
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4, 1->3->4 Output: 1->1->2->3->4->4 将两个有序链表合并为一个新的有序链表并返回.新链表是通过