Unique Number (BIT_Mask)

here I am checking for each bit the number of set bits in the array for that bit and if it is not multiple of 3 it means our result has set the bit at this bit position so I am making that bit like a set bit by taking or, could pls tell the possible reason why this method is not working for
input = [-2,-2,1,1,4,1,4,4,-4,-2].

@dalvimangesh000, use <=31 and long long

1 Like

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.