## Maximize the number of subarrays with XOR as zero

Given an array of N numbers. The task is to maximize the number of subarrays with XOR value zero by swapping the bits of array… Read More »

- Sum of XOR of all subarrays
- Find elements of array using XOR of consecutive elements
- Convert Singly Linked List to XOR Linked List
- XOR of XORs of all sub-matrices
- Count pairs with Bitwise XOR as EVEN number
- Check whether XOR of all numbers in a given range is even or odd
- XOR of path between any two nodes in a Binary Tree
- Number of subarrays such that XOR of one half is equal to the other
- XOR of all the elements in the given range [L, R]
- Count of cyclic permutations having XOR with other binary string as 0
- Range Queries to Find number of sub-arrays with a given xor
- Count of values of x <= n for which (n XOR x) = (n - x)
- Count no. of ordered subsets having a particular XOR value
- Find array using different XORs of elements in groups of size 4
- Find a value whose XOR with given number is maximum
- Choose X such that (A xor X) + (B xor X) is minimized
- Print steps to make a number in form of 2^X - 1
- Find position of left most dis-similar bit for two numbers
- Count of sub-arrays whose elements can be re-arranged to form palindromes
- Check if a number from every row can be selected such that xor of the numbers is greater than zero
- All pairs whose xor gives unique prime
- Find the node whose xor with x gives minimum value
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Composite XOR and Coprime AND
- Find a number which give minimum sum when XOR with every number of array of integers
- Pairs from an array that satisfy the given condition
- Create a sequence whose XOR of elements is y
- Minimizing array sum by applying XOR operation on all elements of the array
- Number of ways for playing first move optimally in a NIM game
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1

Given an array of N numbers. The task is to maximize the number of subarrays with XOR value zero by swapping the bits of array… Read More »

Given a sum and a number . The task is to count all possible ordered pairs (a, b) of positive numbers such that the two… Read More »

Given a number n, we have to find the number of possible values of X such that n = x + n ⊕ x. Here… Read More »

Given a singly linked list of integers. The task is to check if each element in the linked list is present in a pair i.e.… Read More »

Given a Binary Tree as shown below. The task is to count all pair of adjacent nodes whose XOR is an odd number. Explanation: Initially,… Read More »

Given two integers, the task is to find the hamming distance between two integers. Hamming Distance between two integers is the number of bits which… Read More »

Given a binary string, task is to convert this string in to two’s compliment with the help of XOR operator. Examples: Input : 00000101 Output… Read More »

Given a number where, . The task is to find the minimum number of elements to be deleted in between to such that the XOR… Read More »

Given a value K which is the XOR of all the values from 1 to N, the task is to find the minimum value of… Read More »

Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained… Read More »

Given positive integers N, L, and R, we have to find the maximum value of N ⊕ X, where X ∈ [L, R]. Examples: Input… Read More »

Given two binary strings s1 and s2. The XOR of them is X, the task is to find the number of ways to swap two-bit… 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 odd. Examples:… Read More »

Given an array, find the XOR of sum of all pairs in an array. Examples: Input : arr[] = {1, 2, 3} Output : 0… Read More »

Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More »