跳至主要內容

BM1 反转链表


BM1 反转链表

题目链接

题目描述

反转链表.png

刷题思路

代码实现

/* function ListNode(x){
    this.val = x;
    this.next = null;
} */
export function reverseList(pHead) {
  console.log(pHead)
}

一些建议