/**
* 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.
合并两个有序链表
*/
首先创建一个单链表节点结构

使用 递归方式遍历链表,使用compareTo 方法比较链表里的数值大小

/**
* 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.
合并两个有序链表
*/
首先创建一个单链表节点结构
使用 递归方式遍历链表,使用compareTo 方法比较链表里的数值大小
本文标题:Easy_MergeTwoSortedLists_21
本文链接:https://www.haomeiwen.com/subject/dkqcdxtx.html
网友评论