Practice
Learn
← Quit
0 / 0 correct
Algorithms
Medium
1 of 294
How do you detect a cycle in a linked list using O(1) extra space?
A
Reverse the list twice
B
Store visited nodes in a hash set
C
Sort the list
D
Floyd's tortoise and hare: move one pointer 1 step and another 2 steps; they meet if there is a cycle