A
aditimenon
OFFICIAL
11 Sep 2026, 14:47
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.
You can avoid the extra array and do it in O(1) space.
You can avoid the extra array and do it in O(1) space.
Sign in to reply.