# Tag Archives: setBitCount

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
Given an integer N, the task is to print the first K multiples of N using Bitwise Operators. Examples: Input: N = 16, K =… Read More
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