Tag Archives: setBitCount

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
Given an array arr[] consisting of N integers, the task is to find the count of unordered pairs in the given array whose sum contains… Read More
Given an array arr[] consisting of N integers, the task is to count the total number of pairs of array elements from the given array… Read More
Given a boolean matrix mat[][] of size M * N, the task is to print the count of indices from the matrix whose corresponding row… Read More
Given two integers N and K, the task is to find the smallest number greater than N whose Kth bit in its binary representation is… Read More
Given an array arr[] consisting of N integers, the task is to check if it is possible to sort the array using the following swap… Read More
Given two integers X and Y, the task is to find the total number of ways to generate a pair of integers A and B… Read More
Given two integers L and R, the task is to count the numbers having only one unset bit in the range [L, R]. Examples: Input:… Read More
Given an integer N, the task is to find the number of Binary Strings of length N such that frequency of 1‘s is greater than… Read More
Given two positive integers L and R, the task is to count the total number of set bits in the binary representation of all the… Read More