## Count number of trailing zeros in Binary representation of a number using Bitset

Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset. Examples: Input : N… Read More »

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

Given a number. The task is to count the number of Trailing Zero in Binary representation of a number using bitset. Examples: Input : N… Read More »

Given two numbers N and K. The task is to find the index of the K-th set bit in the number from the right. Note:… Read More »

Given an array of integers, the task is to find the AND of all elements of each subset of the array and print the minimum… Read More »

Given an integer n, the task is to count the numbers having only 1 set bit in the range [0, n]. Examples: Input: n =… 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 a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given an integer x and an array arr[] each element of which is a power of 2. The task is to find the minimum number… Read More »

Given a N*N binary matrix, task is to find the count of rectangular sub-matrices with OR value 1. Examples: Input : arr[][] = {{0, 0,… Read More »

Given a ‘N*N’ matrix, the task is to find the XOR of XORs of all possible sub-matrices. Examples: Input :arr = {{3, 1}, {1, 3}}… Read More »

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 two binary strings A and B of length N and M (up to 105). The task is to repeat the below process and find… 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 »