码迷,mamicode.com
首页 >  
搜索关键字:mergetwosortedlists    ( 4个结果
21--Merge Two Sorted Lists
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
【leetcode】21-MergeTwoSortedLists
problem MergeTwoSortedLists 参考 1.leetcode-MergeTwoSortedLists; 完 ...
分类:其他好文   时间:2018-11-09 13:13:12    阅读次数:184
leetcode 21_Merge Two Sorted Lists & leetcode_258 Add Digits & leetcode_66plus one
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
【LeetCode从零单排】No21.MergeTwoSortedLists
题目      这道题是链表的简单应用,将两个有序链表合成一个有序链表。       思路是:表一,表二各取两个对象,分别指向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
4条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!