## Find the number of pairs with odd XOR

Given an array of integers, write a program to find the number of pairs for which the XOR is an odd number. Example: Input[] = {3, 2, 1} Output: 2 Note: 1 XOR 2 = 3 and 2 XOR 3 = 1 Input[] = {3, 6, 9, 4} Output: 4 Naive Approach: Use nested loops … Read more