javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

hare and tortoise algoritm of cycle detection in a linked list

Open Casperrules opened this issue 2 years ago • 0 comments

Did not see the cycle detection algorithm on the list of algorithms for linked list and Floyd's Cycle detection algorithm is a very interesting and intuitive algorithm to do the same in O(1) space and O(n) time complexity so I added the hare-tortoise algorithm to the code. Hope it adds value to the repository

Casperrules avatar Jun 06 '23 14:06 Casperrules