## XOR of a submatrix queries

Given an N * N matrix and q queries, each containing position of top-left and bottom-right corner of a rectangular sub-matrix, the task is to… Read More »

- Subset array sum by generating all the subsets
- Calculate the total fine to be collected
- Remove duplicates from a string in O(1) extra space
- Find triplets in an array whose AND is maximum
- Smallest power of 2 which is greater than or equal to sum of array elements
- Number of pairs whose sum is a power of 2
- Accolite Interview Experience (On-campus)
- Hamming distance between two Integers
- Value in a given range with maximum XOR
- Printing all subsets of {1,2,3,...n} without using array or loop
- Meta Binary Search | One-Sided Binary Search
- Number of values of b such that a = b + (a^b)
- Sum of bitwise OR of all subarrays
- Sum of Bitwise-OR of all subarrays of a given Array | Set 2
- Represent n as the sum of exactly k powers of two | Set 2
- Count pairs with Bitwise XOR as EVEN number
- Range Sum Queries and Update with Square Root
- Length of longest consecutive zeroes in the binary representation of a number.
- Number of solutions of n = x + n ⊕ x
- Number of special pairs possible from the given two numbers
- Find k numbers which are powers of 2 and have sum N | Set 1
- Minimum swaps required to convert one binary string to another
- Occurrences of a pattern in binary representation of a number
- Set the rightmost off bit
- Minimum absolute difference between N and a power of 2
- Check whether bitwise OR of N numbers is Even or Odd
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Maximum value of XOR among all triplets of an array
- Subset Sum Queries in a Range using Bitset
- Program to find the N-th term of series 3, 5, 33, 35, 53…. | Set-2

Given an N * N matrix and q queries, each containing position of top-left and bottom-right corner of a rectangular sub-matrix, the task is to… Read More »

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X < Y ≤ R and X… Read More »

There arises several situations while solving a problem where we need to iterate over all possible combinations of an array. In this article, we will… Read More »

Given an array consisting of N positive integers, find the sum of bit-wise and of all possible sub-arrays of the array. Examples: Input : arr[]… Read More »

Given an array containing N positive integers, the task is to find the sum of XOR of all sub-arrays of the array. Examples: Input :… Read More »

Given an array a[] consisting only 0 and 1. The task is to check if it is possible to transform the array such that the… Read More »

Given two numbers and . Find the values of X and Y in the equations. A = X + Y B = X xor Y… Read More »

Given an array q[] of XOR queries of size N (N is a multiple of 4) which describe an array of the same size as… Read More »

Given an integer n, the task is to find the number of possible values of 0 ≤ x ≤ n which satisfy n XOR x… Read More »

Given an integer N, the task is to check if its equivalent binary number has the equal frequency of consecutive blocks of 0 and 1.… Read More »

Given an integer N. The task is to print the decimal equivalent of the first three bits and the last three bits in the binary… Read More »

Given an integer X > 1 and an integer K > 0, the task is to find the greatest odd number < X such that… Read More »

Given an integer N, the task is to find the minimum absolute difference between N and a power of 2. Examples: Input: N = 4… Read More »

Given two integers n and k, the task is to find whether it is possible to represent n as the sum of exactly k powers… Read More »

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »