K
kmalhotra
OFFICIAL
06 Jun 2026, 09:27
Why does my solution TLE on the last test case?
XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.
Why does my solution TLE on the last test case?
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.