Count pairs with Bitwise XOR as ODD number
Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is odd.Examples: Input : N = 5 A[] = { 5, 4, 7, 2, 1} Output :6 Since pair of A[] = ( 5, 4 ) = 1( 5, 7 ) = 2( 5, 2 ) = 7( 5, 1 ) = 4 ( 4, 7 ) = 3( 4, 2 ) = 6( 4, 1 ) = 5 ( 7, 2 ) = 5( 7, 1 ) = 6 ( 2, 1