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
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