## Convert given integer X to the form 2^N – 1

Given an integer x. The task is to convert x to the form 2n – 1 by performing the following operations in specified order on… 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 all the elements in the given range [L, R]
- XOR of XORs of all sub-matrices
- 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
- 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)
- Print steps to make a number in form of 2^X - 1
- Count no. of ordered subsets having a particular XOR value
- Choose X such that (A xor X) + (B xor X) is minimized
- Find array using different XORs of elements in groups of size 4
- Minimizing array sum by applying XOR operation on all elements of the array
- Sum of XOR of all sub-arrays of length K
- Find a number which give minimum sum when XOR with every number of array of integers
- Check if a number from every row can be selected such that xor of the numbers is greater than zero
- Count of sub-arrays whose elements can be re-arranged to form palindromes
- Create a sequence whose XOR of elements is y
- Find the node whose xor with x gives minimum value
- Pairs from an array that satisfy the given condition
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- All pairs whose xor gives unique prime
- Convert given integer X to the form 2^N - 1
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- Composite XOR and Coprime AND
- Number of ways for playing first move optimally in a NIM game
- Find a sub matrix with maximum XOR
- XOR of all the nodes in the sub-tree of the given node
- Find the node whose xor with x gives maximum value

Given an integer x. The task is to convert x to the form 2n – 1 by performing the following operations in specified order on… Read More »

Given an array of length n ( n > k), we have to find the sum of xor of all the elements of the sub-arrays… Read More »

Problem Given a square matrix of side N we have to find a submatrix such that bitwise XOR of its elements is maximum, and we… Read More »

Given a tree, and the weights of all the nodes, the task is to find the root of the sub-tree whose weighted sum XOR with… Read More »

Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More »

Given two integers N and Y, the task is to generate a sequence of N distinct non-negative integers whose bitwise-XOR of all the elements of… Read More »

Given an array arr[] of size N. The task is to find the number of pairs (arr[i], arr[j]) as cntAND, cntOR and cntXOR such that:… Read More »

Given an array arr[] of non-negative integers, the task is to find an integer X such that (arr[0] XOR X) + (arr[1] XOR X) +… Read More »

Given two integers A and B. The task is to choose an integer X such that (A xor X) + (B xor X) is minimum… Read More »

Given an n-ary tree and Q queries where each query consists of an integer u which denotes a node. The task is to print the… Read More »

Given an array arr[] of N integer elements, the task is to choose an element X and apply XOR operation on every element of the… Read More »

Given a number N, there are two steps to be performed. At odd step, XOR the number with any 2^M-1, where M is chosen by… Read More »

Given a 2-D array of order N X M array elements, the task is to check if we can select a number from every row… Read More »