Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements having a distinct count of… Read More

# Tag Archives: setBitCount

Given an array arr[] consisting of N positive integers, the task is to find the maximum absolute difference between the sum of the array elements… Read More

Given a square matrix mat[][] of dimension N*N, convert the elements present in both the diagonals to their respective binary representations and perform the following… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the minimum sum of incompatibilities of K subsets… Read More

Given an array arr[] consisting of N integers and a 2D array Q[][] consisting of queries of the following two types: 1 L R: Print… Read More

Given an array arr[] consisting of N powers of 2, the task is to count the number of pairs (arr[i], arr[j]) such that i <… Read More

Given a matrix mat[][] of dimension M * N, the task is to first compress it to obtain an array and, then compress it again… Read More

Given a positive integer N, the task is to determine the maximum possible integer that can be formed by performing the following operations on the… Read More

Given an array arr[] consisting of positive integers and an array Q[][] consisting of queries, the task for every ith query is to count array… Read More

Given two integers N and K, the task is to find whether it is possible to represent N as the sum of exactly K powers… Read More

Given an array arr[] of size N, the task is to empty given array by removing 2i – 1 array elements in each operation (i… Read More

Given two arrays arr1[] of size M and arr2[] of size N, the task is to find the sum of bitwise AND of each element… Read More

Given an integer N, the task is to find the minimum number of coins of the form 2i required to make a change for N… Read More

Given two numbers A and B, the task is to count the number of set bits in A and B and flip the bits of… Read More