Given a matrix B[][] of dimensions N * M, the task is to generate a matrix A[][] of same dimensions that can be formed such… Read More

# Tag Archives: Bitwise-OR

Given an array arr[] consisting of non-negative integers, the task for each array element arr[i] is to print the sum of Bitwise OR of all… Read More

Given an integer N, the task is to find the decimal value of the binary string formed by concatenating the binary representations of all numbers… Read More

Minimum number of operations required to make all elements of at least one row of given Matrix prime

Given a matrix, mat[][] of size N * M, the task is to find the minimum count of operations required to make all elements of… Read More

Given a positive integer N, the task is to perform the following sequence of operations on the binary representation of N in C. Finding a… Read More

Given an N-ary Tree consisting of N nodes valued from 1 to N, an array arr[] consisting of N positive integers, where arr[i] is the… Read More

Given two integers X and Y, representing Bitwise XOR and Bitwise AND of two positive integers, the task is to calculate the Bitwise OR value… Read More

Given an integer N, the task is to find all non-negative pairs (A, B) such that the sum of Bitwise OR and Bitwise AND of… Read More

Given an array arr[] of length N, the task is to find the Bitwise OR of the sum of all possible subsequences from the given… Read More

Given an array arr[] consisting of N positive integers and an integer K, the task is to count all pairs possible from the given array… Read More

Given an array arr[] of size N, the task is to find the Bitwise XOR of all possible unordered pairs from the given array. Examples:… Read More

Given an array, arr[] of size N, the task is to count the number of unordered pairs such that Bitwise AND and Bitwise OR of… Read More

Given two arrays arr[] and brr[] of length N and M respectively, create an array res[] of length N using the below operations such that… Read More

Given a natural number N, the task is to find the largest number M having the same length in binary representation as N such that… Read More

Given an integer N, the task is to find the largest number M, where (M < N), such that N(XOR)M is equal to N(OR)M i.e.… Read More