Skip to content

Tag Archives: setBitCount

Given a positive integer N, the task is to find the minimum number of addition operations required to convert the number 0 to N such… Read More
Given an array arr[] consisting of N positive integers, the task is to find the largest size of the subset of the array arr[] with… Read More
Given a positive integer N and an array arr[] consisting of K integers and consider a binary string(say S) having N set bits, the task… Read More
Given a positive integer N, the task is to find the pair of integers (X, Y) such that the Bitwise XOR of X and Y… Read More
Given 3 integers A, B, C, the task is to find the maximum XOR value of three number selected one from each range [0, A],… Read More
Given a positive integer N, the task is to count the number of N-digit numbers such that the count of distinct odd and distinct even… Read More
Given a binary tree, the task is to compress all the nodes on the same vertical line into a single node such that if the… Read More
Given an array arr[] of N pairs, where each array element denotes a query of the form {L, R}, the task is to find the… Read More
Given a Binary Tree consisting of N nodes, the task is to first compress the tree diagonally to get a list of integers and then,… Read More
Given an integer N, the task is to find the number of steps required to reduce the given number N to 1 by performing the… Read More
Given a positive integer N, the task is to count all numbers which are less than N and Bitwise AND of all such numbers with… Read More
Given an array arr[] of size N and an array Q[], the task is to calculate the sum of Bitwise XOR of all elements of… Read More
Given an array arr[] consisting of N integers, the task is to find the product of the count of set bits in the binary representation… Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum number of bits of array elements required to be… Read More
Given an array arr[] consisting of N integers and integer K, the task is to find the smallest integer X with exactly K set bits… Read More