Question DSA-BIT-0020
HardTwo numbers appear once and every other number appears twice in an array. How can both be found in O(n) time and O(1) space?
- A.
Use a hash map
- B.
It needs O(n²) time
- C.
Sign up free to see the answer and a step-by-step explanation.