Question DSA-BIT-0054
MediumEvery element appears three times except one, which appears once. How can the single one be found in O(1) extra space?
- A.
Sort and scan
- B.
Use a hash set
- C.
XOR all elements
- D.
Count each bit position modulo 3
Sign up free to see the answer and a step-by-step explanation.