human
Give me a code to find the element that appears once and the other steps required given the following:
Find the element that appears once | Method to find the element that occur only once.
one & arr [ i ] " gives the bits that  are there in both 'ones' and new  element from arr[]. We add these  bits to 'twos' using bitwise OR.
one & arr [ i ] " gives the bits that  are there in both 'ones' and new  element from arr[]. We add these  bits to 'twos' using bitwise OR.
The common bits are those bits which appear third time . So these bits should not be there in both ' ones ' and ' twos ' . common_bit_mask contains all these bits as 0 , so that the bits can be removed from ' ones ' and 'twos  .
Remove common bits ( the bits that appear third time ) from 'ones  .
Remove common bits ( the bits that appear third time ) from 'twos  .
driver code"
Solution in Python:
assistant
#Here is code to find the element that appears once and the other steps required.
 def getSingle ( arr , n ) :
	ones = 0
	twos = 0
	for i in range ( n ) :
		twos = twos | ( ones & arr [ i ] )
		ones = ones ^ arr [ i ]
		common_bit_mask = ~ ( ones & twos )
		ones &= common_bit_mask
		twos &= common_bit_mask
	return ones
arr = [ 3 , 3 , 2 , 3 ]
n = len ( arr )
print ( " The ▁ element ▁ with ▁ single ▁ occurrence ▁ is ▁ " , getSingle ( arr , n ) )