If the bitwise AND is equal to the last element then print the arrangement
if ( andVal == arr [ n - 1 ] ) printArr ( arr , n ) ; else Console . Write ( " - 1" ) ; } static int [ ] swap ( int [ ] arr , int i , int j ) { int temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; return arr ; }