算法通关村第一关——链表环

32 阅读1分钟

1.为什么fast不会跳过slow?

因为fast和slow只差一步

image.png

2.为什么寻找入口可以让head和slow在fast==slow后遍历相遇得到?

数学证明得到 无法瞪出来 image.png