# Tag Archives: Bitwise-XOR

Given an array ‘arr1’ of n positive integers. Contents of arr1[] are copied to another array ‘arr2’, but numbers are shuffled and one element is… Read More
We are given a string. We are also given indexes of first and last characters in string. The task is to reverse the string without… Read More
Given an array of integers arr[] and a number m, count the number of subarrays having XOR of their elements as m.Examples:  Input : arr[]… Read More
Given an array of integers, we need to get the total XOR of all subarray XORs where subarray XOR can be obtained by XORing all… Read More
Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions:  a XOR x > x 0 < a < x… Read More
Given an array of integers. All numbers occur twice except one number which occurs once. Find the number in O(n) time & constant extra space.… Read More
Given an array A[] having n positive elements. The task to create another array B[] such as B[i] is XOR of all elements of array… Read More
Given an array of size n and integer k, count all pairs in array which differ in exactly K bits of binary representation of both… Read More
Given four arrays and an integer x, find the number of quadruples which satisfy a^b^c^d = x, where a belongs from Arr1, b belongs from… Read More
Given an array arr[] of size n, we need to find the sum of all the values that come from XORing all the elements of… Read More
Given a sequence of three binary sequences A, B and C of N bits. Count the minimum bits required to flip in A and B… Read More
Given a positive integer n, count numbers x such that 0 < x <n and x^n > n where ^ is bitwise XOR operation.Examples:   Input… Read More
Given two integers A & B. Task is to check if A and B are same or not without using comparison operators.Examples:  Input : A… Read More
Given three binary arrays, each of size n, the task is to find minimum flip of bits in the first and second array such that… Read More
Given a number, the task is to find XOR of count of 0s and count of 1s in binary representation of a given number. Examples:   Input… Read More