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

- Minimum Bitwise OR operations to make any two array elements equal
- Queries for bitwise OR in the index range [L, R] of the given array
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- Sum of Bitwise OR of all pairs in a given array
- Find N distinct numbers whose bitwise Or is equal to K
- Queries for bitwise OR in the given matrix
- Maximum OR value of a pair in an array
- Count pairs of elements such that number of set bits in their OR is B[i]
- 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 »

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 »

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 »