# Tag Archives: setBitCount

Given a positive number N, the task is to find out all the perfect powers of two which are less than or equal to the… Read More
Prerequisite: Bitset function in STL library Given a number N, the task is to find the absolute difference of the number of set and unset bits… Read More
Given an integer N, the task is to flip all the bits to the left of rightmost set bit and print the number generated. Examples:… Read More
Given a binary array arr, the task is to find the maximum number of 0s that can be flipped such that the array has no… Read More
Given a binary string S, and an integer K, the task is to find the minimum number of flips required such that every substring of… Read More
Given a number N, the task is to write C program to count the number of 0s and 1s in the binary representation of N.… Read More
Given a binary string S of size N and an integer K. The task is to find the maximum number of set bit appears in… Read More
Given an array arr of N elements and another array Q containing values of K, the task is to print the count of elements in… Read More
Given an array arr containing N integers, the task is to count the possible number of pairs of elements with the same number of set… Read More
Given a number X, calculate number of possible pairs (a, b) such that bitwise or of a and b is equal to X and number… Read More
Given an array arr[] of N integers and Q queries, each query having two integers L and R, the task is to find the element… Read More
Given an array arr[] containing N positive integers, the task is to find the maximum bitwise OR value of a pair in the given array… Read More
Given binary string str, the task is to maximize the count of 0s in the left substring and 1s in the right substring by splitting… Read More
Given N stairs, the task is to find the minimum number of jumps of perfect power of 2 requires to reach the Nth stair. Examples: … Read More
Given an array arr[] of N elements and an integer K, the task is to count all the elements whose number of set bits is… Read More