Practice
Learn
← Quit
0 / 0 correct
Algorithms
Medium
1 of 247
How do you find the single number that appears once when every other appears twice, in O(1) space?
A
Sum all numbers
B
XOR all numbers: pairs cancel, leaving the unique one
C
Use a hash set
D
Sort and scan