##
Sum of XOR of all possible subsets
March 2, 2017

Given an array arr[] of size n, we need to find sum of all the values that comes from XORing all the elements of the subsets. Input : arr[] = {1, 5, 6} Output : 28 Total Subsets = 23 1 = 1 5 = 5 6 = 6 1 ^ 5 = 4 1… Read More »