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

- Minimum Bitwise OR operations to make any two array elements equal
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- Queries for bitwise OR in the index range [L, R] of the given array
- Sum of Bitwise OR of all pairs in a given array
- Bitwise OR of N binary strings
- Find N distinct numbers whose bitwise Or is equal to K
- Queries for bitwise OR in the given matrix
- Pairs of strings which on concatenating contains each character of "string"
- Count pairs of elements such that number of set bits in their OR is B[i]
- Count pairs with bitwise OR less than Max

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 »

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 »

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 »

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 »

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 »

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 »

Given an array arr[] of size N. The task is to find the number of pairs (arr[i], arr[j]) as cntAND, cntOR and cntXOR such that:… Read More »

Given an array of strings arr[]. The task is to find the count of unordered pairs of strings (arr[i], arr[j]), which on concatenation contains each… Read More »

Given an array arr[] of N integers, the task is to count the pairs of indices (i, j) such that 0 ≤ i < j… Read More »

Given an array arr[] of binary strings, the task is to calculate the bitwise OR of all of these strings and print the resultant string.… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise OR of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given an array arr[] and an integer K, the task is to count the number of sub-arrays having bitwise OR ≥ K. Examples: Input: arr[]… Read More »

Given an array[] of N positive integers and M queries. Each query consists of two integers L and R represented by a range. For each… Read More »

Give an array of positive integers. The task is to find the total sum after performing the bitwise OR operation on all the sub-arrays of… Read More »

Given an array of positive integers. The task is to find the size of the smallest subset such that the Bitwise OR of that set… Read More »