力扣206 反转链表
给你单链表的头节点 head ,请你反转链表,并返回反转后的链表。

class Solution {
public ListNode reverseList(ListNode head) {
ListNode pre = null;
while(head!=null){
ListNode next = head.next;
head.next=pre;
pre = head;
head = next;
}
return pre;
}
}










![[C++实战]日期类的实现](https://i-blog.csdnimg.cn/direct/c4bc1ae9384745108acf233eefac4107.gif)






![NSS [NSSRound#4 SWPU]ez_rce](https://img-blog.csdnimg.cn/img_convert/33d73358faef7cf0e4a8e5d49c949e9a.png)

![NSS [NSSRound#13 Basic]flask?jwt?](https://img-blog.csdnimg.cn/img_convert/e4280b3decffdb9b9b54f192561ccc91.png)