Find sum of XNOR of all unordered pairs from given Array
Given an array arr[] of size N, the task is to find the sum of all XNOR values of all possible unordered pairs from the given array. Examples: Input: N = 5, arr[] = {2, 2, 2, 1, 1}Output:10Explanation: Here, 2 XNOR 2 = 3, 2 XNOR 2 = 3, 2 XNOR 2 = 3, 1 XNOR 1 = 1, 2 XNOR 1 = 0, 2 XNOR 1 = 0, 2 XNOR 1