How to handle negative intergers

if the integers are negative then how do we handle those integers and boundary cases like for this integer -2147483648.

@Marr_iss its only for positive numbers. if you want something that work with +ve too just store the freq of number in map and where freq==1 print it
dont forget to hit like and mark resolved if cleared :smiley:

I tried to solve this problem in leetcode. In that problem, some of the cases had negative integers, its true that this can be solved using a map but, is there any workaround so that the same bitwise solution can be extended to pass the negative integer cases. I tried one hack by checking beforehand that if a no is negative then I reserved one bit at the 64th index for the sign and then I took the absolute value of this integer to applied the bitwise solution, this approach worked for few negative integers but for INT_MIN it failed. is there any workaround for this special case.?

@Marr_iss well i cant think of a way other than storing all no bits in 2d array or in built in bitset but you can google for a way

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.