0
Floyd's tortoise-and-hare algorithm is used to
- Asort a linked list in O(n log n) time
- Bdetect a cycle in a linked list using O(1) extra space
- Creverse a linked list in place
- Dfind the middle element of a sorted array
Correct answer: B
Floyd's tortoise-and-hare algorithm is used to