## Count Set-bits of number using Recursion

Given a number N. The task is to find the number of set bits in its binary representation using recursion. Examples: Input : 21 Output… Read More »

- Find maximum xor of k elements in an array
- XOR of all the elements in the given range [L, R]
- Find the number of pair of Ideal nodes in a given tree
- Find XOR of numbers from the range [L, R]
- Equal Sum and XOR of three Numbers
- Sum of Bitwise-OR of all Submatrices
- Sum of bitwise AND of all submatrices
- Find uncommon characters of the two strings | Set 2
- Quadruplet pair with XOR zero in the given Array
- Find element with the maximum set bits in an array
- Count pairs of elements such that number of set bits in their AND is B[i]
- Count total set bits in all numbers from 1 to n | Set 2
- Highest power of 2 that divides a number represented in binary
- Alternate XOR operations on sorted array
- Minimize the number of steps required to reach the end of the array
- Minimum Bitwise OR operations to make any two array elements equal
- Fibonacci Power
- Maximum subset sum such that no two elements in set have same digit in them
- Position of the K-th set bit in a number
- Find letter's position in Alphabet using Bit operation
- Count number of trailing zeros in Binary representation of a number using Bitset
- Number formed by the rightmost set bit in N
- Find a number which give minimum sum when XOR with every number of array of integers
- Number of ways to reach the end of matrix with non-zero AND value
- Longest Subarray having strictly positive XOR
- Find a sub matrix with maximum XOR
- Count of numbers having only 1 set bit in the range [0, n]
- Queries for bitwise AND in the index range [L, R] of the given array
- Choose X such that (A xor X) + (B xor X) is minimized
- Count smaller elements on right side and greater elements on left side using Binary Index Tree

Given a number N. The task is to find the number of set bits in its binary representation using recursion. Examples: Input : 21 Output… Read More »

Given an array arr[] of size N. The task is to find smaller elements on the right side and greater elements on the left side… Read More »

Given an integer N. The task is to count the numbers of pairs of integers A and B such that A + B + N… Read More »

Given a tree of N nodes and an integer K, each node is numbered between 1 and N. The task is to find the number… Read More »

Prerequisite: https://www.geeksforgeeks.org/little-and-big-Endian-mystery/ Little Endian and Big Endian are ways or storing data in machines. Some machines might use Little Endian byte ordering while others might… Read More »

Given a non-negative integer N, the task is to find two integers A (greatest integer smaller than N) and (smallest integer greater than N) such… Read More »

Given an array arr[] of N integers such that any two adjacent elements in the array differ at only one position in their binary representation.… Read More »

Given an array arr[] of N integers and an integer K. The task is to find the maximum xor subset of size K of the… Read More »

Given an array arr[] and two integers X and K. The task is to perform the following operation on array K times: Sort the array.… Read More »

Given an array arr[] of integers and an integer K, we can perform the Bitwise OR operation between any array element and K any number… Read More »

Given a positive integer N, the task is to count the sum of the number of set bits in the binary representation of all the… Read More »

Given an array arr[] of N non-negative integers. The task is to find the length of the longest sub-array such that XOR of all the… Read More »

Given an integer N, the task is to find an integer M formed by taking the rightmost set bit in N i.e. the only set… Read More »

Given a large binary number.The task is to count the number of 1’s in a given range from L to R (1 based indexing). Examples:… Read More »

Given two integers L and R, the task is to find the XOR of elements of the range [L, R]. Examples :‘ Input: L =… Read More »