class Solution {
public ListNode reverseList(ListNode head) {
ListNode cur = null;
ListNode pre = head;
while(pre!=null){
ListNode temp = pre.next;
pre.next = cur;
cur = pre;
pre=temp;
}
return cur;
}
}
04-08
246
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)