## Sum of XOR of all subarrays

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

- Hamming distance between two Integers
- Find elements of array using XOR of consecutive elements
- Value in a given range with maximum XOR
- Count pairs with Bitwise XOR as EVEN number
- Check whether XOR of all numbers in a given range is even or odd
- Number of solutions of n = x + n ⊕ x
- Maximum value of XOR among all triplets of an array
- Convert Singly Linked List to XOR Linked List
- Maximize the number of subarrays with XOR as zero
- XOR of path between any two nodes in a Binary Tree
- Count of cyclic permutations having XOR with other binary string as 0
- Count of values of x <= n for which (n XOR x) = (n - x)
- Sum of XOR of all subarrays
- Minimum number of elements to be removed to make XOR maximum
- Replace every element of the array with BitWise XOR of all other
- Count ordered pairs of positive numbers such that their sum is S and XOR is K
- Count pairs with Bitwise XOR as ODD number
- Count numbers whose difference with N is equal to XOR with N
- Sum of XOR of sum of all pairs in an array
- Find a value whose XOR with given number is maximum
- Replace every array element by Bitwise Xor of previous and next element
- Count all pairs of adjacent nodes whose XOR is an odd number
- Find position of left most dis-similar bit for two numbers
- Count no. of ordered subsets having a particular XOR value
- Count numbers whose XOR with N is equal to OR with N
- All pairs whose xor gives unique prime
- Check if elements of Linked List are present in pair
- Minimum value of N such that xor from 1 to N is equal to K
- Find array using different XORs of elements in groups of size 4
- XOR of all Prime numbers in an Array

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

Given a range [ L, R ], the task is to find if value of XOR of all natural numbers in range L to R… Read More »

Given an array arr[], the task is to count the number of unordered pairs of indices (i, j) such the gcd(2, a[i]^a[j]) > 1 and… Read More »

Given an array q[] of XOR queries of size N (N is a multiple of 4) which describe an array of the same size as… Read More »

Prerequisite: XOR Linked List – A Memory Efficient Doubly Linked List | Set 1 XOR Linked List – A Memory Efficient Doubly Linked List |… Read More »

Given an integer n, the task is to find the number of possible values of 0 ≤ x ≤ n which satisfy n XOR x… Read More »

Given an array arr[] of n elements and a number K, find the number of ordered subsets of arr[] having XOR of elements as K… Read More »

Given an array arr[], the task is to count all the valid pairs from the array. A pair (arr[i], arr[j]) is said to be valid… Read More »

Given an array arr[] in which XOR of every 2 consecutive elements of the original array is given i.e if the total number of elements… Read More »

Given an array arr[], the task is to count all the pairs whose xor gives the unique prime, i.e. no two pairs should give the… Read More »

Given two numbers n1 and n2. The task is to find the position of first mismatching bit in the binary representation of the two numbers… Read More »

Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is even. Examples:… Read More »

Given two binary strings and . Let be set of all the cyclic permutations of string . The task is to find how many strings… Read More »

Given a value X, the task is to find the number Y which will give maximum value possible when XOR with X. (Assume X to… Read More »

Given a binary tree with distinct nodes and a pair of two nodes. The task is to find the XOR of all of the nodes… Read More »