## Count of sub-arrays whose elements can be re-arranged to form palindromes

Given an array arr[] of size n. The task is to count the number of possible sub-arrays such that their elements can be re-arranged to… 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
- Find the node whose xor with x gives minimum value
- Count of sub-arrays whose elements can be re-arranged to form palindromes
- 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 an array arr[] of size n. The task is to count the number of possible sub-arrays such that their elements can be re-arranged to… Read More »

Given a ‘N*N’ matrix, the task is to find the XOR of XORs of all possible sub-matrices. Examples: Input :arr = {{3, 1}, {1, 3}}… Read More »

Given an array of N numbers, the task is to find the number of sub-arrays (size of the sub-array should be an even number) of… Read More »

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

Given a range [ L, R ], the task is to find if value of XOR of all natural numbers in range L to R… Read More »

Given an array arr[], the task is to count the number of unordered pairs of indices (i, j) such the gcd(2, a[i]^a[j]) > 1 and… Read More »

Given an array q[] of XOR queries of size N (N is a multiple of 4) which describe an array of the same size as… Read More »

Prerequisite: XOR Linked List – A Memory Efficient Doubly Linked List | Set 1 XOR Linked List – A Memory Efficient Doubly Linked List |… Read More »

Given an integer n, the task is to find the number of possible values of 0 ≤ x ≤ n which satisfy n XOR x… Read More »

Given an array arr[] of n elements and a number K, find the number of ordered subsets of arr[] having XOR of elements as K… Read More »

Given an array arr[], the task is to count all the valid pairs from the array. A pair (arr[i], arr[j]) is said to be valid… Read More »

Given an array arr[] in which XOR of every 2 consecutive elements of the original array is given i.e if the total number of elements… Read More »

Given an array arr[], the task is to count all the pairs whose xor gives the unique prime, i.e. no two pairs should give the… Read More »

Given two numbers n1 and n2. The task is to find the position of first mismatching bit in the binary representation of the two numbers… Read More »

Given an array of N integers, the task is to find the number of pairs (i, j) such that A[i] ^ A[j] is even. Examples:… Read More »