## Count of cyclic permutations having XOR with other binary string as 0

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 »

## Find a value whose XOR with given number is maximum

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 »

## XOR of path between any two nodes in a Binary Tree

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 »

## Count number of bits changed after adding 1 to given N

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 »

## XOR of all elements of array with set bits equal to K

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 »

## Replace every element of the array with BitWise XOR of all other

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 »

## XOR of Prime Frequencies of Characters in a String

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 »

## Check if the Xor of the frequency of all digits of a number N is zero or not

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 »

## Replace every array element by Bitwise Xor of previous and next element

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 »

## XOR of all Prime numbers in an Array

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 »

## Comparing leading zeros in binary representations of two numbers

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 »

## Maximum value of XOR among all triplets of an array

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 »

## Count numbers whose XOR with N is equal to OR with N

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 »

## Count numbers whose difference with N is equal to XOR with N

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 »

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