title: Find The Element That Appears Once
signature: func findTheElementThatAppearsOnce(arr []int, n int) int {
source_py: def find_the_element_that_appears_once(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
source_cpp: int find_the_element_that_appears_once(vector<int> arr, int n) {
    int ones = 0, twos = 0;
    int common_bit_mask;
    for ( int i = 0;
    i < n;
    i ++ ) {
      twos = twos | ( ones & arr [ i ] );
      ones = ones ^ arr [ i ];
      common_bit_mask = ~ ( ones & twos );
      ones &= common_bit_mask;
      twos &= common_bit_mask;
    }
    return ones;
  }