Now divide elements in two sets by comparing rightmost set bit of XOR with bit at same position in each element . Initialize missing numbers
$ x = 0 ; $ y = 0 ; for ( $ i = 0 ; $ i < $ n ; $ i ++ ) { if ( $ arr [ $ i ] & $ set_bit_no )