Skip to content

Tag Archives: setBitCount

Given a binary tree, the task is to find the total count of set bits in the node values of all the root to leaf… Read More
Given two integers A and B, the task is to print the integer among the two, which will be converted to an odd integer by… Read More
Given an array arr[], the task is to generate a modified array such that all its elements are maximized by swapping of bits.Examples:   Input: arr[]… Read More
Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s… Read More
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:Attention… 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

Start Your Coding Journey Now!