末日搭车指南
面向人生编程

导航

 

2020年8月18日

摘要: // 初始化 快指针和慢指针 ListNode slow = head; ListNode fast = head; /** * Change this condition to fit specific problem. * 在这里避免空指针错误 **/ while (slow != null & 阅读全文
posted @ 2020-08-18 12:55 末日搭车指南 阅读(179) 评论(0) 推荐(0)
 
摘要: 我的代码:测试用例【1,2】2, 时会报错,无法不能删除第一个指针 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { v 阅读全文
posted @ 2020-08-18 12:44 末日搭车指南 阅读(175) 评论(0) 推荐(0)