Given an array, arr[] of size N, the task is to count the number of unordered pairs such that Bitwise AND and Bitwise OR of… Read More

# Tag Archives: Bitwise-OR

Given two arrays arr[] and brr[] of length N and M respectively, create an array res[] of length N using the below operations such that… Read More

Given a natural number N, the task is to find the largest number M having the same length in binary representation as N such that… Read More

Given an integer N, the task is to find the largest number M, where (M < N), such that N(XOR)M is equal to N(OR)M i.e.… Read More

Given an array arr[] of N strings. The task is to find the count of all possible pairs of strings such that their concatenations has… Read More

Given an array arr[] of N positive integers and a number K, the task is to find the maximum value of bitwise OR of the… Read More

Given an array arr[] of N positive elements, the task is to find the maximum bitwise OR value of a pair from the given array.Examples:… Read More

Given Bitwise AND, OR, and XOR of N elements of an array denoted by a, b, c. The task is to find the elements of… Read More

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… Read More

Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More

Given a number X, calculate number of possible pairs (a, b) such that bitwise or of a and b is equal to X and number… Read More

Given an array arr[] containing N positive integers, the task is to find the maximum bitwise OR value of a pair in the given array… Read More

The bit_or is an inbuilt function in C++ which is used to perform bitwise_or and return the result after applying the bitwise_or operation on it’s… Read More

Given a value K and a binary tree, the task is to find out the number of subtrees having bitwise OR of all its elements… Read More