## Find Kth smallest value for b such that a + b = a | b

Given a number a and k, the task is to find the k’th smallest value for b such that a + b = a |… Read More »

- Find XOR of all elements in an Array
- Count of subarrays of an Array having all unique digits
- Check if a Number is Odd or Even using Bitwise Operators
- Bitwise AND of all the elements of array
- Count number of binary strings without consecutive 1’s : Set 2
- Program to find the Nth natural number with exactly two bits set
- XOR of every element of an Array with a given number K
- Partition of a set into K subsets with equal sum using BitMask and DP
- XOR of elements in a given range with updates using Fenwick Tree
- Bitwise XOR of a Binary array
- Find a Mother vertex in a Graph using Bit Masking
- Count of pairs whose bitwise AND is a power of 2
- Count maximum occurrence of subsequence in string such that indices in subsequence is in A.P.
- Check if left and right shift of any string results into given string
- Count subarrays with sum equal to its XOR value
- Maximum number of set bits count in a K-size substring of a Binary String
- Number of subsets with same AND, OR and XOR values in an Array
- Largest number in the Array having frequency same as value
- Find the largest number smaller than integer N with maximum number of set bits
- Count of binary strings of length N having equal count of 0's and 1's
- Count of subarrays of size K with elements having even frequencies
- XOR of pairwise sum of every unordered pairs in an array
- Find a number such that maximum in array is minimum possible after XOR
- Sum of bit differences for numbers from 0 to N
- Remove all even parity nodes from a Doubly and Circular Singly Linked List
- Maximum weighted edge in path between two nodes in an N-ary tree using binary lifting
- Find the remainder when N is divided by 4 using Bitwise AND operator
- Find the length of the Largest subset such that all elements are Pairwise Coprime
- Bitwise operations on Subarrays of size K
- Number of integers in a range [L, R] which are divisible by exactly K of it's digits

Given a number a and k, the task is to find the k’th smallest value for b such that a + b = a |… Read More »

Given the leaf nodes of a perfect binary tree, the task is to construct the XOR tree and print the root node of this tree.… Read More »

Given a value N and K, the task is to generate N-bits Gray Code starting from the value K. Examples: Input: N = 2, K… Read More »

Given a binary string, the task is to find whether all the digits of the string can be made equal i.e either 0 or 1… Read More »

Given the size of a binary array consisting of 0’s only as n and an integer m which is the number of flips allowed from… Read More »

Given an integer, array A. Find the sum of set bits raised to the power A[i] for each element in A[i]. Example: Input: N =… Read More »

Given an array arr[] of N distinct positive integers, let’s denote max(i, j) and secondMax(i, j) as the maximum and the second maximum element of… Read More »

Given an array arr[] of non-negative integers, let’s define X as the XOR of all the array elements and S as the sum of all… Read More »

Given two integers M and N the task is to find the number formed by concatenating the binary equivalents of M and N i.e. M… Read More »

Given two non-negative integers N and K, the task is to invert the Kth most significant bit of N and print the number obtained after… Read More »

Given an integer N, the task is to find the greatest number that can be obtained by flipping at most K bits in the binary… Read More »

Given an integer N and an infinite number of Full Binary Trees of different depths, the task is to choose minimum number of trees such… Read More »

Two players are playing a series of games of Rock–paper–scissors. There are a total of N games played represented by an array arr[][] where arr[i][0]… Read More »

Given two integer N and K, the task is to find the value of N XOR N XOR N XOR … XOR N (K times).… Read More »

Given a graph with N nodes and M edges where each edge has a color (either black or green) and a cost associated with it.… Read More »