Docker报错-Docker Desktop - Unexpected WSL error

时间:2024-10-17 07:30:15
206.反转链表

瞎姬霸爱.: [code=java] public ListNode reverseList(ListNode head) { //A ListNode pre = null; //空杯 ListNode tmp = null; //(allB) ListNode cur = head; while(cur != null){ //一个空水杯 装剩下所有的水(allB) tmp = cur.next; //allB空出来了就装要交换的A cur.next = pre; //A杯空了 把要交换的(allB)杯里面的水放A中 pre = cur; //把tmp空出来 准备新杯子 cur = tmp; } return pre; } [/code]