Why should node references be compared instead of values?
Practice this question from Linked List Cycle - Fast and slow pointers Pattern Practice Quiz, with options and an explanation.
Question
Why should node references be compared instead of values?
Option A — Correct answer
Different nodes can have equal values
Option B
Values are always unique
Option C
References are slower than values
Option D
Cycles depend on sorting
Explanation
Different nodes can have equal values, but cycles are about references.