# Tag Archives: Bitwise-OR

## Maximum bitwise OR value of subsequence of length K

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 »

## Maximum OR value of a pair in an Array | Set 2

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

## Construct the Array using given bitwise AND, OR and XOR

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 »

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

## Find array sum using Bitwise OR after splitting given array in two halves after K circular shifts

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 »

## Count of pairs having bit size at most X and Bitwise OR equal to X

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 »

## Maximum OR value of a pair in an Array without using OR operator

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 »

## std::bit_or in C++ with Examples

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 »

## Count of subtrees in a Binary Tree having bitwise OR value K

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 »

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

## Bitwise Operations on Digits of a Number

Given a number N, the task is to perform the bitwise operations on digits of the given number N. The bitwise operations include: Finding the… Read More »

## XOR and OR of all N-digit palindrome number

Given an integer N. The task is to find the XOR and OR of all N digit palindromic numbers. Examples Input: 3 Output: XOR =… Read More »

## Bitwise OR( | ) of all even number from 1 to N

Given a number N, the task is to find the bitwise OR( | ) of all even number from 1 to N. Examples: Input: 2… Read More »

## Find an array of size N that satisfies the given conditions

Given three integers N, S and K, the task is to create an array of N positive integers such that the bitwise OR of any… Read More »

## Remove minimum numbers from the array to get minimum OR value

Given an array arr[] of N positive integers, the task is to find the minimum number of elements to be deleted from the array so… Read More »