Tag Archives: Bitwise-XOR

Given a number N. The task is to count the number of distinct XOR of any possible pairs using numbers from 1 to N inclusive.… Read More
Given two integers N and K, generate a sequence of size N+1 where the ith element is (i-1)⊕K, the task is to find the MEX… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More
Given an array arr[] of odd length N containing positive integers. The task is to find a positive integer X such that, adding X to… Read More
Given an array of integers arr[] of size N, the task is to check whether arr[] can be split into different subarrays such that on… Read More
Given an array arr[] consisting of N positive integers. The task is to count the number of different non-empty subsets of arr[] having maximum bitwise… Read More
Given an array arr[] of N integers, the task is to find the size of the largest subset such that the bitwise AND of all… Read More
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More
Given two arrays that are duplicates of each other except one element, that is one element from one of the array is missing, we need… Read More
Given an array a[] of size N and an integer K, the task is to find a value X in the range [0, K] which… Read More
Given an array, arr[] of N positive integers and M queries which consist of two integers [Li, Ri] where 1 ≤ Li ≤ Ri ≤ N.… Read More