## Maximum set bit count from pairs of integers from 0 to N that yields a sum as N

Given an integer N, the task is to find the maximum frequency of set bits among all pairs of integers from 0 to N that… Read More »

- Maximum number of set bits count in a K-size substring of a Binary String
- Count of elements in an Array whose set bits are in a multiple of K
- Maximize count of 0s in left and 1s in right substring by splitting given Binary string
- Minimum bit flips such that every K consecutive bits contain at least one set bit
- Minimum steps to reach the Nth stair in jumps of perfect power of 2
- Find the element having maximum set bits in the given range for Q queries
- Maximum OR value of a pair in an Array without using OR operator
- Maximum number of 0s that can be flipped such that Array has no adjacent 1s
- C program to count zeros and ones in binary representation of a number
- Count of pairs having bit size at most X and Bitwise OR equal to X
- Count of even and odd set bit Array elements after XOR with K for Q queries
- Count integers in an Array which are multiples their bits counts
- Maximum set bit count from pairs of integers from 0 to N that yields a sum as N
- Count of pairs in an Array with same number of set bits
- Maximize count of set bits in a root to leaf path in a binary tree
- Count of binary strings of length N with even set bit count and at most K consecutive 1s
- First number to leave an odd remainder after repetitive division by 2
- Generate an Array such with elements maximized through swapping bits
- Number formed by flipping all bits to the left of rightmost set bit
- Find all powers of 2 less than or equal to a given number
- Absolute difference between set and unset bit count in N

Given an integer N, the task is to find the maximum frequency of set bits among all pairs of integers from 0 to N that… Read More »

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… 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 »