## Check whether bitwise OR of N numbers is Even or Odd

Given an array arr[] containing N numbers. The task is to check whether the bitwise-OR of the given N numbers is even or odd. Examples:… Read More »

## Count distinct Bitwise OR of all Subarrays

Given an array A of non-negative integers, where . The task is to count number of distinct possible results obtained by taking the bitwise OR… Read More »

## Count numbers whose XOR with N is equal to OR with N

Given a number N, the task is to find the count of X such that N XOR X == N OR X, where 0<=X<=N Examples:… Read More »

## Find bitwise OR of all possible sub-arrays

Given an array A of size N where, . The task is to find the OR of all possible sub-arrays of A and then the… Read More »

## Sum of bitwise OR of all subarrays

Give an array of positive integers, find the total sum after performing the bit wise OR operation on all the sub arrays of a given… Read More »

## Count pairs with Bitwise OR as Even number

Given an array A[] of size N. The task is to find the how many pair(i, j) exists such that A[i] OR A[j] is even.… Read More »

## Bitwise OR (or | ) of a range

Given two integers L and R. Determine the bitwise OR of all the integers in the range [L, R] (both inclusive). Examples: Input: L =… Read More »

## Maximize the bitwise OR of an array

Given an array of N integers. The bitwise OR of all the elements of the array has to be maximized by performing one task. The… Read More »

## Largest set with bitwise OR equal to n

Given an integer n, find the largest possible set of non negative integers with bitwise OR equal to n. Examples: Input : n = 5… Read More »

## Maximum subset with bitwise OR equal to k

Given an array of non negative integers and an integer k, find the subset of maximum length with bitwise OR equal to k. Examples :… Read More »

## Sum of bitwise OR of all possible subsets of given set

Given an array arr[] of size n, we need to find sum of all the values that comes from ORing all the elements of the… Read More »

## Leftover element after performing alternate Bitwise OR and Bitwise XOR operations on adjacent pairs

Given an array of N(always a power of 2) elements and Q queries. Every Query consists of two elements index and value.. We need to… Read More »

## Numbers whose bitwise OR and sum with N are equal

Given a non-negative integer N, the task is to find count of non-negative integers less than or equal to N whose bitwise OR and sum… Read More »