S
sairao5
15 Oct 2026, 11:37
Asked in my NVIDIA OA last week.
XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.
Asked in my NVIDIA OA last week.
XOR cancels equal numbers, and x & (x - 1) clears the lowest set bit. Both give O(1) space solutions here.
Same idea, but I used a deque. Works fine.
Sign in to reply.