# Tag Archives: setBitCount

Given an array arr[] consisting of positive integers and an array Q[][] consisting of queries, the task for every ith query is to count array… 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 an array arr[] of size N, the task is to empty given array by removing 2i – 1 array elements in each operation (i… Read More
Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise AND of each element… Read More
Given an integer N, the task is to find the minimum number of coins of the form 2i required to make a change for N… Read More
Given two numbers A and B, the task is to count the number of set bits in A and B and flip the bits of… Read More
Given two integers N and K, the task is to find the count of numbers up to N having K-th bit set. Examples: Input: N… Read More
Given two positive integers N and K, the task is to count the numbers from the range [1, N] whose Kth bit from the right,… Read More
Given an array arr[] of length N, the task for every array element is to print the sum of its Bitwise XOR with all other… Read More
Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise OR of each element… Read More
Given an integer N, the task is to count the number of even and odd binomial coefficients up to Nth power. Examples: Input: N =… Read More
Given an array arr[] consisting of N integers (All array elements are a perfect power of 2), the task is to calculate the sum of… Read More
Given an integer N, the task is to reduce the value of N to 0 by performing the following operations minimum number of times: Flip… Read More
Given an integer N, the task is to find the Nth natural number with exactly two set bits. Examples: Input: N = 4Output: 9Explanation: Numbers… Read More
Given three positive integers L, R, and K, the task is to find the count of numbers in the range [L, R] having K consecutive… Read More