## 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 »

## Remove one element to get minimum OR value

Given an array arr[] of N elements, the task is to remove one element from the array such that the OR value of the array… Read More »

## Maximum Bitwise OR pair from a range

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X, Y ≤ R and (X |… Read More »

## Longest subsequence with a given OR value : Dynamic Programming Approach

Given an array arr[], the task is to find the longest subsequence with a given OR value M. If there is no such sub-sequence then… Read More »

## Longest sub-sequence with a given OR value : O(N) Approach

Given an array arr[], the task is to find the longest subsequence with a given OR value M. If there is no such sub-sequence then… Read More »

## Number of subsets with a given OR value

Given an array arr[] of length N, the task is to find the number of subsets with a given OR value M. Examples: Input: arr[]… Read More »

## Maximum possible Bitwise OR of the two numbers from the range [L, R]

Given a range [L, R], the task is to find the maximum bitwise OR of some pair (a, b) from the given range. Examples: Input:… Read More »

## Convert a given Binary tree to a tree that holds Logical OR property

Given a Binary Tree (Every node has at most 2 children) where each node has value either 0 or 1. The task is to convert… Read More »

## Maximum OR value of a pair in an array

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 »

## Minimum Bitwise OR operations to make any two array elements equal

Given an array arr[] of integers and an integer K, we can perform the Bitwise OR operation between any array element and K any number… Read More »

## Count pairs of elements such that number of set bits in their OR is B[i]

Given two arrays A[] and B[] of N elements each. The task is to find the number of index pairs (i, j) such that i… Read More »

## Sum of Bitwise OR of all pairs in a given array

Given an array “arr[0..n-1]” of integers. The task is to calculate the sum of Bitwise OR of all pairs, i.e. calculate the sum of “arr[i]… Read More »

## Find N distinct numbers whose bitwise Or is equal to K

Given two integers N and K, the task is to find N distinct integers whose bit-wise OR is equal to K. If there does not… Read More »

## Queries for bitwise OR in the given matrix

Given an N * N matrix mat[][] consisting of non-negative integers and some queries consisting of top-left and bottom-right corner of the sub-matrix, the task… Read More »

## Queries for bitwise OR in the index range [L, R] of the given array

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise OR of all… Read More »