网站介绍:文章浏览阅读33次。public static boolean hasCycle(ListNode head){ if(head==null||head.next==null) return false; ListNode slow=head; ListNode fast=head.next; while(slow!=fast) { if(fast==null||fast.next==null...
- 链接地址:https://blog.csdn.net/weixin_45395062/article/details/116460153
- 链接标题:判断链表是否有环-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:2711
- 网站标签:判断链表是否有环