Skip to main content
multiple duplicates
Source Link
David Richerby
  • 82.2k
  • 26
  • 144
  • 238

Map an array to 1 << A[i] and then XOR everything together. Your duplicateduplicates will be the numbernumbers where corresponding bit is off.

Map an array to 1 << A[i] and then XOR everything together. Your duplicate will be the number where corresponding bit is off.

Map an array to 1 << A[i] and then XOR everything together. Your duplicates will be the numbers where corresponding bit is off.

Source Link
Hauleth
  • 101
  • 2

Map an array to 1 << A[i] and then XOR everything together. Your duplicate will be the number where corresponding bit is off.