## Find the root of the sub-tree whose weighted sum XOR with X is minimum

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 »

- Find maximum xor of k elements in an array
- XOR of all the elements in the given range [L, R]
- Find XOR of numbers from the range [L, R]
- Equal Sum and XOR of three Numbers
- Range Queries to Find number of sub-arrays with a given xor
- Quadruplet pair with XOR zero in the given Array
- Alternate XOR operations on sorted array
- Minimum Bitwise XOR operations to make any two array elements equal
- Sum of XOR of all sub-arrays of length K
- Find array such that no subarray has xor zero or Y
- Find a number which give minimum sum when XOR with every number of array of integers
- Longest Subarray having strictly positive XOR
- Find a sub matrix with maximum XOR
- Choose X such that (A xor X) + (B xor X) is minimized
- Find a partition point in array to maximize its xor sum
- Minimizing array sum by applying XOR operation on all elements of the array
- Print steps to make a number in form of 2^X - 1
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- XOR in a range of a binary array
- Convert given integer X to the form 2^N - 1
- XOR of all the nodes in the sub-tree of the given node
- Create a sequence whose XOR of elements is y
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- 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
- Find the node whose xor with x gives minimum value
- Number of ways for playing first move optimally in a NIM game
- Find the root of the sub-tree whose weighted sum XOR with X is maximum
- Find the node whose xor with x gives maximum value
- Maximum XOR with given value in the path from root to given node in the tree

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 »

Given an array arr[] of size n and q queries and an integer k. Each query consists of an index range [l, r] and the… Read More »

Given an integer N, the task is to generate all possible binary strings of length N which contain “01” as the sub-string exactly twice. Examples:… Read More »

Two players A and B are playing NIM Game with each other. Both are playing optimally. Player A starts the game. The task is to… Read More »

Given a range [L, R], the task is to find the XOR of all the integers in the given range i.e. (L) ^ (L +… Read More »