醉东枫

关注

每日一练lc(24)

醉东枫

关注

阅读 17

2022-01-22

class Solution {
    public ListNode swapPairs(ListNode head) {
if(head==null || head.next==null){
    return head;
}
ListNode next=head.next;
head.next=swapPairs(head.next.next);
next.next=head;
return next;
    }
}

在这里插入图片描述

相关推荐

伽马星系

每日一练(lc287)

伽马星系 28 0 0

芝婵

每日一练(Lc35)

芝婵 44 0 0

辰鑫chenxin

每日一练

辰鑫chenxin 75 0 0

南柯Taylor

每日一练 — 2022.02.19

南柯Taylor 54 0 0

yeamy

每日一练 — 2022.02.17

yeamy 73 0 0

niboac

每日一练 — 2022.02.02

niboac 34 0 0

fbd4ffd0717b

每日一练 — 2022.02.08

fbd4ffd0717b 39 0 0

Greatiga

每日一练 — 2022.01.06

Greatiga 60 0 0

辰鑫chenxin

每日一练 — 2022.03.03

辰鑫chenxin 65 0 0

TiaNa_na

每日一练 — 2022.02.16

TiaNa_na 83 0 0

精彩评论(0)

0 0 举报