![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表
hxkovo
这个作者很懒,什么都没留下…
展开
-
剑指25 合并两个有序链表
题目描述:代码如下:迭代class Solution { public ListNode mergeTwoLists(ListNode l1, ListNode l2) {ListNode newhead=new ListNode(0); ListNode curr=newhead; while (l1!=null&&l2!=null){ if(l1.val<l2.val){ c原创 2021-07-22 01:23:07 · 54 阅读 · 0 评论 -
LC 92反转链表Ⅱ
题目描述:/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next;原创 2021-07-08 00:32:17 · 115 阅读 · 0 评论 -
剑指24 反转单链表
题目描述:代码如下:原创 2021-06-09 18:35:03 · 70 阅读 · 0 评论