# Tag Archives: Bitwise-XOR

## Calculate Bitwise OR of two integers from their given Bitwise AND and Bitwise XOR values

Given two integers X and Y, representing Bitwise XOR and Bitwise AND of two positive integers, the task is to calculate the Bitwise OR value… Read More »

## Count ways to make Bitwise XOR of odd and even indexed elements equal by removing an array element

Given an array arr[] of length N, the task is to find the count of array indices such that removing an element from these indices… Read More »

## Find two numbers from their sum and XOR | Set 2

Given two integers X and Y, the task is to find the two integers having sum X and Bitwise XOR equal to Y. Examples: Input:… Read More »

## Numbers formed by flipping common set bits in two given integers

Given two positive integers A and B, the task is to flip the common set bitsin A and B. Examples: Input: A = 7, B… Read More »

## Count set bits in Bitwise XOR of all adjacent elements upto N

Given a positive integer N, the task is to find the total count of set bits by performing Bitwise XOR on all possible adjacent elements… Read More »

## Count pairs with Bitwise XOR greater than both the elements of the pair

Given an array arr[] of size N, the task is to count the number of pairs whose Bitwise XOR is greater than both the elements… Read More »

## Check if rows of a Matrix can be rearranged to make Bitwise XOR of first column non-zero

Given a matrix mat[][] of size N * M, the task is to check if it is possible to rearrange the row elements of the… Read More »

## Count nodes having Bitwise XOR of all edges in their path from the root equal to K

Given a Binary Tree consisting of N nodes and two integers R and K. Each edge of the tree has a positive integer associated with… Read More »

## Maximum sum possible from given Matrix by performing given operations

Given a matrix arr[][] of dimensions 2 * N, the task is to maximize the sum possible by selecting at most one element from each… Read More »

## Rearrange array to make Bitwise XOR of similar indexed elements of two arrays is same

Given two arrays A[] and B[] consisting of N integers (N is odd), the task is to rearrange array B[] such that for each 1… Read More »

## Count pairs having Bitwise XOR less than K from given array

Given an array arr[]of size N and an integer K, the task is to count the number of pairs from the given array such that… Read More »

## Count pairs having bitwise XOR greater than K from a given array

Given an array arr[]of size N and an integer K, the task is to count the number of pairs from the given array such that… Read More »

## XOR of array elements whose modular inverse with a given number exists

Given an array arr[] of length N and a positive integer M, the task is to find the Bitwise XOR of all the array elements… Read More »

## Maximum XOR of a path from top-left to bottom-right cell of given Matrix

Given a matrix, mat[][] of dimensions N * M, the task is to print the maximum bitwise XOR value that can be obtained for a… Read More »

## Bitwise XOR of all unordered pairs from a given array

Given an array arr[] of size N, the task is to find the bitwise XOR of all possible unordered pairs of the given array.  Examples:… Read More »