摘要: 1. Linked List Cycle(判断链表是否有环) 思路:设置slow和fast两个指针,初始化为head和head.next。遇到slow == fast说明有环,遇到fast == null || fast.next == null说明无环。模版程序如下。 1 public class 阅读全文
posted @ 2017-02-17 15:55 揪萌striving 阅读(386) 评论(0) 推荐(0) 编辑