Skip to content

Category Archives: Bit Magic

In a party of N people, each person is denoted by an integer. Couples are represented by the same number. Find out the only single… Read More
Given an array A[] consisting of N elements, the task is to find the minimum length of the subarray starting from each index and the… Read More
Given two integers X and S, the task is to find the minimum length of the sequence of positive integers such that the sum of… Read More
Given an array arr[] of size N and an integer K, the task is to invert the 0 bit (unset bit) of any integer of… Read More
Given an array A[] of size N, the task is to find the last remaining element in a new array B containing all pairwise bitwise… Read More
Given a positive integer N. The task is to print the array in decreasing order in which the numbers are odd powers of 2  and… Read More
Given two positive integers A and B, the task is to find the number of integers X such that (A⊕X ) & B = 0… Read More
The XOR operation between two numbers P and Q can be looked in a different way as the bitwise sum modulo 2 on the bits… Read More
Given a positive integer N, the task is to find all pairs of integers (i, j) from the range [1, N] in increasing order of… Read More
Given binary strings S1 and S2 of length N, the task is to check if S2 can be made equal to S1 by performing the… Read More
Given an array of size N. Consider all the subarrays starting at each index from [0, N – 1]. Determine the length of the smallest… Read More
Given an integer N denoting the size of an array and two arrays containing Bitwise AND and Bitwise OR of adjacent elements of the array… Read More
Given an array Arr[] of N integers and an integer K, the task is to find if it is possible to make the count of… Read More
Given an array A[] of positive integers, print all the unique non-empty subsets of the array  Note: The set can not contain duplicate elements, so… Read More
Given two integers X and Y, and an integer K, the task is to find the minimum number of operations to make X equal to… Read More

Start Your Coding Journey Now!