## Count ordered pairs of positive numbers such that their sum is S and XOR is K

Given a sum and a number . The task is to count all possible ordered pairs (a, b) of positive numbers such that the two… 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
- Find the root of the sub-tree whose weighted sum XOR with X is minimum

Given a sum and a number . The task is to count all possible ordered pairs (a, b) of positive numbers such that the two… Read More »

Given a number n, we have to find the number of possible values of X such that n = x + n ⊕ x. Here… Read More »

Given a singly linked list of integers. The task is to check if each element in the linked list is present in a pair i.e.… Read More »

Given a Binary Tree as shown below. The task is to count all pair of adjacent nodes whose XOR is an odd number. Explanation: Initially,… Read More »

Given two integers, the task is to find the hamming distance between two integers. Hamming Distance between two integers is the number of bits which… Read More »

Given a binary string, task is to convert this string in to two’s compliment with the help of XOR operator. Examples: Input : 00000101 Output… Read More »

Given a number where, . The task is to find the minimum number of elements to be deleted in between to such that the XOR… Read More »

Given a value K which is the XOR of all the values from 1 to N, the task is to find the minimum value of… Read More »

Given a non-negative integer N. The task is to invert the bits of the number N and print the decimal equivalent of the number obtained… Read More »

Given positive integers N, L, and R, we have to find the maximum value of N ⊕ X, where X ∈ [L, R]. Examples: Input… Read More »

Given two binary strings s1 and s2. The XOR of them is X, the task is to find the number of ways to swap two-bit… 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 odd. Examples:… Read More »

Given an array, find the XOR of sum of all pairs in an array. Examples: Input : arr[] = {1, 2, 3} Output : 0… Read More »

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 »