## Find XOR of numbers from the range [L, R]

Given two integers L and R, the task is to find the XOR of elements of the range [L, R]. Examples :‘ Input: L =… Read More »

- Sum of XOR of all subarrays
- Smallest power of 2 which is greater than or equal to sum of array elements
- Sum of bitwise AND of all subarrays
- Represent n as the sum of exactly k powers of two | Set 2
- Sum of bitwise AND of all submatrices
- Find k numbers which are powers of 2 and have sum N | Set 1
- XOR of all the elements in the given range [L, R]
- Count pairs of elements such that number of set bits in their AND is B[i]
- XOR of XORs of all sub-matrices
- Sum of Bitwise-OR of all Submatrices
- Find element with the maximum set bits in an array
- Occurrences of a pattern in binary representation of a number
- Number of submatrices with OR value 1
- First and Last Three Bits
- Maximum Bitwise AND pair from given range
- Highest power of 2 that divides a number represented in binary
- Check if the binary representation of a number has equal number of 0s and 1s in blocks
- Minimum number of operations required to sum to binary string S
- Fibonacci Power
- Find the values of X and Y in the Given Equations
- Minimum absolute difference between N and a power of 2
- Maximum subset sum such that no two elements in set have same digit in them
- XOR of a submatrix queries
- Find letter's position in Alphabet using Bit operation
- Minimize the number of steps required to reach the end of the array
- Minimum number of given powers of 2 required to represent a number
- Position of the K-th set bit in a number
- Find uncommon characters of the two strings | Set 2
- Count of numbers having only 1 set bit in the range [0, n]
- Count of values of x <= n for which (n XOR x) = (n - x)

Given two integers L and R, the task is to find the XOR of elements of the range [L, R]. Examples :‘ Input: L =… Read More »

Given two arrays a[] and b[], the task is to find the count of common elements in both the given arrays. Note that both the… 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 an array of N elements. Find the subset of elements which has maximum sum such that no two elements in the subset has common… 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[] of size N where each element is either 0 or 1. The task is to find the count of 0s and 1s which are at prime… Read More »

Given two strings str1 and str2, the task is to find and print the uncommon characters of the two given strings in sorted order without… Read More »

Given a number n. You are required to find ( Fib(n) ^ Fib(n) ) % 10^9 + 7, where Fib(n) is the nth fibonacci number.… 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 »

Problem Given a square matrix of side N we have to find a submatrix such that bitwise XOR of its elements is maximum, and we… Read More »

Given a integer N, the task is to multiply the number with 15 without using multiplication * and division / operators. Examples: Input: N =… 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 two integers x and y, the task is to find the average of these numbers i.e. (x + y) / 2 using bit operations.… 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 AND of all… Read More »