public class MergeTwoSortedLists { /* 解法一:迭代 */ public ListNode mergeTwoLists(ListNode l1, ListNode l2) { if (l1==null) return l2; if (l2==null) ... ...
分类:
其他好文 时间:
2019-09-03 22:16:49
阅读次数:
93
problem MergeTwoSortedLists 参考 1.leetcode-MergeTwoSortedLists; 完 ...
分类:
其他好文 时间:
2018-11-09 13:13:12
阅读次数:
184
l leetcode 21_Merge Two Sorted Lists
题目: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.
解法:
#includ...
分类:
其他好文 时间:
2015-08-17 01:11:55
阅读次数:
161
题目 这道题是链表的简单应用,将两个有序链表合成一个有序链表。 思路是:表一,表二各取两个对象,分别指向current和next,进行交叉比较排序。Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nod...
分类:
其他好文 时间:
2015-02-11 12:48:27
阅读次数:
148