# Tag Archives: setBitCount

Given two arrays A[] and B[] of N elements each. The task is to find the number of index pairs (i, j) such that i… Read More
Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More
Given a tree, and the weights of all the nodes and an integer x, the task is to find a node i such that weight[i]… Read More
Given an array arr[] of positive integers, the task is to sort the array in decreasing order of count of set bits in binary representations… Read More
Given two strings s1 and s2. The task is to take one character from the first string and one character from the second string and… Read More
Given a positive integer . Find the number of steps required to minimize it to 1. In a single step N either got reduced to half… Read More
Given an integer . The task is to find the number of bits changed after adding 1 to the given number.Examples:   Input : N = 5… Read More
Given an array of integers and a number K. The task is to find the XOR of only those elements of the array whose total… Read More
Given an array arr with unique elements, the task is to count the total number of pairs of elements that have equal set bits count.Examples:  … Read More
Given an array with n elements. The task is to find the maximum number of contiguous array elements which have the same number of set… Read More
Given two integers(less than 2^31) A and B. The task is to find the number of bits that are different in their binary representation. Examples: … Read More
Given a sum and a number . The task is to count all possible ordered pairs (a, b) of positive numbers such that the two positive integers… Read More
Given an integer . Find the number of solutions of which satisfies the equation:  a = b + (a^b) Examples:  Input: a = 4 Output: 2 The… Read More
Given a Binary Tree. The task is to print the number of set bits in each of the nodes in the Binary Tree.    Recommended:… Read More
Given two integers, the task is to find the hamming distance between two integers. Hamming Distance between two integers is the number of bits that… Read More