开发者

What is Floyd's_cycle_finding_algorithm and where can it be used efficiently?

开发者 https://www.devze.com 2023-03-10 11:43 出处:网络
I am trying to understand Floyd\'s_cycle_finding_algorithm but the ex开发者_如何转开发planations seem abstract.Can someone help me in undertanding this and whats the basic use ?Does it mean it can be

I am trying to understand Floyd's_cycle_finding_algorithm but the ex开发者_如何转开发planations seem abstract.Can someone help me in undertanding this and whats the basic use ?Does it mean it can be used to find if an array has duplicate elements ? And also java implementation ?


Wikipedia has a good entry on this: http://en.wikipedia.org/wiki/Cycle_detection, it's used for detecting cycles in linked data structures (typically linked lists).

0

精彩评论

暂无评论...
验证码 换一张
取 消