## Count pairs with Bitwise XOR as EVEN number

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 »

- 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 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 »

Given an integer . The task is to find the number of bits changed after adding 1 to the given number. Examples: Input : N… Read More »

Given an array of integers and a number K. The task is to find the XOR of only those elements of the array whose total… Read More »

Given an array of integers. The task is to replace every element by the bitwise xor of all other elements of the array. Examples: Input:… Read More »

Given a string containing only lowercase english alphabets. The task is to find the bitwise XOR of all the prime frequencies of the characters in… Read More »

Given a number N, the task is to check if xor value of the frequency of the digits is zero or not. Examples: Input: N… Read More »

Given an array of integers, replace every element with xor of previous and next elements with following exceptions. a) First element is replaced by sum… Read More »

Given an array of integers arr[]. The task is to find the bitwise XOR of all the prime numbers present in the array. Examples: Input:… Read More »

Given two Integer numbers x and y. Compare and print which one of them has more leading zeros using Bitwise operation. If both the no.… Read More »

Given an array of integers ‘arr’, the task is to find the maximum XOR value of any triplet pair among all the possible triplet pairs.… Read More »

Given a number N, the task is to find the count of X such that N XOR X == N OR X, where 0<=X<=N Examples:… Read More »

Given a number N. The task is to count the all possible values of x such that nx is equal to (N-x), where denotes bitwise… Read More »