Checking array with two elements possible or not .
if ( xorr & mid == 1 ) { cout << " Array ▁ size ▁ is ▁ " << 3 << " STRNEWLINE " ; cout << " Array ▁ is ▁ " << xorr << " ▁ " << mid << " ▁ " << mid << " STRNEWLINE " ; } else { cout << " Array ▁ size ▁ is ▁ " << 2 << " STRNEWLINE " ; cout << " Array ▁ is ▁ " << ( xorr + mid ) << " ▁ " << mid << " STRNEWLINE " ; } }