一、思路链接
https://www.bilibili.com/video/BV1Af4y1m7Ct
二、具体题目
https://leetcode-cn.com/problems/fan-zhuan-lian-biao-lcof/
三、具体代码
var reverseList = function(head) {
// 需要定义三个指针
let prev = null;
let cur = head;
let next = head;
while(cur !== null) {
next = cur.next;
cur.next = prev;
prev = cur;
cur = next;
}
return prev;
};