## Check if bits in range L to R of two numbers are complement of each other or not

Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More »

- Sum of XOR of all subarrays
- Find elements of array using XOR of consecutive elements
- Convert Singly Linked List to XOR Linked List
- XOR of XORs of all sub-matrices
- Count pairs with Bitwise XOR as EVEN number
- Check whether XOR of all numbers in a given range is even or odd
- Number of subarrays such that XOR of one half is equal to the other
- XOR of all the elements in the given range [L, R]
- Count of cyclic permutations having XOR with other binary string as 0
- Range Queries to Find number of sub-arrays with a given xor
- Count of values of x <= n for which (n XOR x) = (n - x)
- Count no. of ordered subsets having a particular XOR value
- Find array using different XORs of elements in groups of size 4
- Find a value whose XOR with given number is maximum
- Print steps to make a number in form of 2^X - 1
- Choose X such that (A xor X) + (B xor X) is minimized
- Find position of left most dis-similar bit for two numbers
- Count of sub-arrays whose elements can be re-arranged to form palindromes
- Check if a number from every row can be selected such that xor of the numbers is greater than zero
- All pairs whose xor gives unique prime
- Find a number which give minimum sum when XOR with every number of array of integers
- Create a sequence whose XOR of elements is y
- Find the node whose xor with x gives minimum value
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Pairs from an array that satisfy the given condition
- Composite XOR and Coprime AND
- Minimizing array sum by applying XOR operation on all elements of the array
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- Number of ways for playing first move optimally in a NIM game
- XOR of all the nodes in the sub-tree of the given node

Given two non-negative numbers a and b and two values l and r. The problem is to check whether all bits at corresponding positions in… Read More »

Given a non-negative number n and two values l and r. The problem is to check whether all the bits are unset or not in… Read More »

BitSet is a class defined in the java.util package. It creates an array of bits represented by boolean values. Syntax public void xor(BitSet set); Explanation:… Read More »

Given two binary strings. The task is to check if string s1 can be converted to string s2 by performing the given operations any number… Read More »

Given a number N and the min and max range. Given N values of a and b respectively. The task is to count the number… Read More »

Given an array A of size n. the task is to generate a new sequence B with size N^2 having elements sum of every pair… Read More »

Given an array where all elements appear even number of times except two, print the two odd occurring elements. It may be assumed that the… Read More »

Given an array of N numbers and a number K. The task is to insert a number in the given array such that the bitwise… Read More »

Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its… Read More »

You are given a sequence of N integers and Q queries. In each query, you are given two parameters L and R. You have to… Read More »

Given an array arr[] of n integers and some queries. Each query is of the form (L, R), where L and R are indices of… Read More »

A Levelwise OR/XOR alternating segment tree is a segment tree, such that at every level the operations OR and XOR alternate. In other words at… Read More »

Given an array of N(always a power of 2) elements and Q queries. Every Query consists of two elements index and value.. We need to… Read More »

Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one… Read More »

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »