The Tortoise and Hare algorithm,( Floyd’s Cycle Detection Algorithm) is used to detect cycles in a sequence of values or linked lists. Same algo is used to detect many other thing like kth node from last, starting point of cycle or middle of linked list.
Detailed description
The Tortoise and Hare algorithm,( Floyd’s Cycle Detection Algorithm) is used to detect cycles in a sequence of values or linked lists. Same algo is used to detect many other thing like kth node from last, starting point of cycle or middle of linked list.
Context
Please assign this to me under hactoberfest.
Possible implementation
No response
Additional information
No response