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

- Number of subarrays have bitwise OR >= K
- Sum of Bitwise-OR of all Submatrices
- Subset Sum Queries in a Range using Bitset
- Queries for bitwise OR in the index range [L, R] of the given array
- Bitwise OR of N binary strings
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- 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"
- Sum of Bitwise OR of all pairs in a given array
- Count pairs with bitwise OR less than Max

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 »

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

Given two binary numbers strings and of length . Find the number of ways of swapping two bits in s1(only s1 not s2) so that… Read More »