Skip to content

Tag Archives: Bitwise-XOR

Given an integer N, the task is to generate a permutation from 1 to N such that the bitwise XOR of differences between adjacent elements… Read More
Given a linked list containing N nodes of binary numbers, the task is to check whether it is possible to rearrange the linked list in… Read More
Given an array arr of positive integers of size N, the task is to split the array into 3 partitions, such that the sum of… Read More
Given an integer N count the number of values of X such that  X⊕N > N, where  ⊕ denotes bitwise  XOR operation Examples: Input: N =… Read More
Given an integer N, the task is to print a permutation of numbers from 0 to N-1, such that: There is no duplicate element in… Read More
Given an array arr of length N, the task is to rearrange the elements of given array such that for each element, its bitwise XOR… Read More
Given an integer N, consider an array having elements in the range [0, N-1] such that the maximum Bitwise XOR of all adjacent pairs is… Read More
Given an integer N, the task is to find the number of distinct values possible for the bit-wise XOR of X and Y where 1… Read More
Given an integer N, find the one’s complement of the integer. Examples: Input: N = 5Output: 2Explanation: Binary representation of 5 is “101”. Its one’s… Read More
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

Start Your Coding Journey Now!