Count pairs with bitwise XOR exceeding bitwise AND from a given array
Given an array, arr[] of size N, the task is to count the number of pairs from the given array such that the bitwise AND(&) of each pair is less than its bitwise XOR(^)....
read more
Bitwise operations on Subarrays of size K
Given an array arr[] of positive integers and a number K, the task is to find the minimum and maximum values of Bitwise operation on elements of subarray of size K....
read more
Minimum XOR of OR and AND of any pair in the Array
Given an array arr[] of N positive integers the task is to find the minimum value of Bitwise XOR of Bitwise OR and AND of any pair in the given array....
read more
Count of pairs with bitwise XOR value greater than its bitwise AND value | Set 2
Given an array arr that contains N positive Integers. Find the count of all possible pairs whose bit wise XOR value is greater than bit wise AND value...
read more
Number of subsets with same AND, OR and XOR values in an Array
Given an array arr[] of size N consisting of non-negative integers, the task is to find the number of non-empty subsets of the array such that the bitwise AND, bitwise OR and bitwise XOR values of the subsequence are equal to each other....
read more
Count of paths in given Binary Tree with odd bitwise AND for Q queries
Given an integer Q representing the number of queries and an array where each query has an integer N. Our task is to iterate through each query and find the number of paths such that bitwise AND of all nodes on that path is odd....
read more
Check whether bitwise AND of a number with any subset of an array is zero or not
Given an array and a Number N. The task is to check whether there exists any subset of this array such that the bitwise AND of this subset with N is zero....
read more
Queries to calculate Bitwise AND of an array with updates
Given an array arr[] consisting of N positive integers and a 2D array Q[][] consisting of queries of the type {i, val}, the task for each query is to replace arr[i] by val and calculate the Bitwise AND of the modified array....
read more
Sum of Bitwise AND of each array element with the elements of another array
Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise AND of each element of arr1[] with the elements of the array arr2[]....
read more
Maximum value of B less than A such that A ^ B = A + B
Given an integer A, the task is to find the maximum value possible(B) which is less than A, such that xor of these two numbers A and B are equal to their sum, that is A ^ B = A + B....
read more
Bitwise OR of bitwise AND of all possible non-empty subarrays after Q query updates
Given an array arr[] consisting of N positive integers and an array of queries Q[] of type [L, R], the task is to find the Bitwise OR of the bitwise AND of all the possible non-empty subarrays of the array after updating array element at index L to R for each query....
read more
Find the size of Largest Subset with positive Bitwise AND
Given an array arr[] consisting of N positive integers, the task is to find the largest size of the subset of the array arr[] with positive Bitwise AND....
read more