What should the dry run track?
Practice this question from Single Number - XOR Cancellation Pattern Practice Quiz, with options and an explanation.
Question
What should the dry run track?
Option A — Correct answer
Track the running XOR and observe duplicate cancellation.
Option B
Only the final answer, not the bit state
Option C
The alphabetical order of variable names
Option D
Only whether input is sorted
Explanation
Track the running XOR and observe duplicate cancellation.