Question DSA-TP-0073
HardHow do two pointers check whether a linked list has a cycle?
- A.
Reverse the list
- B.
A slow pointer moves 1 step and a fast pointer 2; they meet if there is a cycle
- C.
Sign up free to see the answer and a step-by-step explanation.