A
aarav.m
16 Jun 2026, 06:36
Finally got AC after 3 WAs. Sharing what I missed.
XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.
Finally got AC after 3 WAs. Sharing what I missed.
XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.
Nice. Got asked a variant of this in an interview.
Sign in to reply.