## Construct an array from XOR of all elements of array except element at same index

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 »

## Count all pairs of an array which differ in K bits

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 »

## Count all Quadruples from four arrays such that their XOR equals to ‘x’

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 »

## Sum of XOR of all possible subsets

Given an array arr[] of size n, we need to find sum of all the values that comes from XORing all the elements of the… Read More »

## Count minimum bits to flip such that XOR of A and B equal to C

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 »

## Count smaller numbers whose XOR with n produces greater value

Given a positive integer n, count numbers x such that 0 < x <n and x^n > n where ^ is bitwise XOR operation. Examples:… Read More »

## Compare two integers without using any Comparison operator

Given two integers A & B. Task is to check if A and B are same or not without using comparison operators. Examples: Input :… Read More »

## Minimum flips in two binary arrays so that their XOR is equal to another array

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 »

## XOR counts of 0s and 1s in binary representation

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:… Read More »

## Iteratively Reverse a linked list using only 2 pointers (An Interesting Method)

Given pointer to the head node of a linked list, the task is to reverse the linked list. Examples: Input : Head of following linked… Read More »

## Minimum XOR Value Pair

Given an array of integers. Find the pair in an array which has minimum XOR value. Examples : Input : arr[] = {9, 5, 3}… Read More »

## Find Maximum XOR value of a sub-array of size k

Given an array of integers, the task is to find maximum XOR value of a subarray of size K. Examples : Input : arr[] =… Read More »

## Find pair for given sum in a sorted singly linked without extra space

Given a sorted singly linked list and a value x, the task is to find pair whose sum is equal to x. We are not… Read More »

## Count all pairs with given XOR

Given an array of distinct positive integers and a number x, find the number of pairs of integers in the array whose XOR is equal… Read More »

## XOR Cipher

XOR Encryption is an encryption method used to encrypt data and is hard to crack by brute-force method, i.e generating random encryption keys to match… Read More »