Skip to content

Tag Archives: setBitCount

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
Given a positive integer N, the task is to find the Nth term of the Ruler Function Series. The Ruler Function Series is a series,… Read More
Given an array arr[] consisting of N positive integers and a 2D array Q[][] consisting of queries of the type {i, val}, the task for… Read More
Given a positive integer N, the task is to calculate the sum of all decimals which can be expressed as binary representations of first N… Read More
Given an array arr[] consisting of N strings, the task is to find the maximum product of length of the strings arr[i] and arr[j] for… Read More
Given a binary matrix mat[][] of dimensions N * N, the task is to check if Bitwise AND of the decimal numbers obtained by concatenating… Read More
Given an integer N, the task is to find the absolute difference between the number of set bits present in the number N and in… Read More
Given an array arr[] consisting of N non-negative integers and an integer M, the task is to find the count of unordered pairs {X, Y}… Read More
Given a positive integer N, the task is to check whether the given integer is an even power of 2 or not. Examples: Input: N… Read More
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
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 count the number of subarrays possible consisting of elements… 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