Given an array arr[] of odd length N containing positive integers. The task is to find a positive integer X such that, adding X to… Read More

# Tag Archives: Bit Algorithms

Given an array arr[] consisting of N positive integers. The task is to count the number of different non-empty subsets of arr[] having maximum bitwise… Read More

Given N program codes and their respective debugging times in an array codeTime and an integer WorkingSessionTime, the ith program takes codeTime[i] hours to finish.… Read More

Given two integers L and R. The task is to find the count of all numbers in the range [L, R] whose Least Significant Bit… 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 an unweighted and undirected graph consisting of N nodes and two integers a and b. The edge between any two nodes exists only if… Read More

Given three numbers N, A, and X, the task is to construct the lexicographically smallest binary array of size N, containing A 0s and having… Read More

Bit Manipulation is a technique used in a variety of problems to get the solution in an optimized way. This technique is very effective from… Read More

Given an array arr[] consisting of N and an integer K, the task is to print the elements of arr[] whose rightmost set bit is… Read More

Given an integer N, the task is to print all the subsets of the set formed by the set bits present in the binary representation… 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[] consisting of non-negative integers, the task for each array element arr[i] is to print the sum of Bitwise OR of all… Read More

Given two integers X and S, the task is to construct a sequence of distinct integers from the range [1, X] such that the sum… Read More

Given a positive integer N, the task is to perform the following sequence of operations on the binary representation of N in C. Finding a… Read More

Given six positive integers representing the Bitwise XOR and Bitwise AND of all possible pairs of a triplet (a, b, c), the task is to… Read More