且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

链表循环检测算法

更新时间:2023-02-26 16:25:06

因为第一个(非移动)指针可能不在循环内,所以指针永远不会相遇.(请记住,循环可能只包含列表的一部分.)

Because the first (non-moving) pointer might not lie within the loop, so the pointers would never meet. (Remember that a loop may consist of only part of the list.)