## Queries to find the count of integers in a range that contain the given pattern

Given a binary pattern patt and Q queries where each query consists of a range [L, R], for every query the task is to find… Read More »

- Find maximum xor of k elements in an array
- Find the number of pair of Ideal nodes in a given tree
- Find XOR of numbers from the range [L, R]
- Count total set bits in all numbers from 1 to n | Set 2
- Equal Sum and XOR of three Numbers
- Count smaller elements on right side and greater elements on left side using Binary Index Tree
- Find uncommon characters of the two strings | Set 2
- Count of triplets that satisfy the given equation
- Quadruplet pair with XOR zero in the given Array
- Find element with the maximum set bits in an array
- Nth XOR Fibonacci number
- Count pairs of elements such that number of set bits in their AND is B[i]
- Alternate XOR operations on sorted array
- Highest power of 2 that divides a number represented in binary
- Minimize the number of steps required to reach the end of the array
- Bit manipulation | Swap Endianness of a number
- Fibonacci Power
- Minimum Bitwise OR operations to make any two array elements equal
- Find the Majority Element | Set 3 (Bit Magic)
- Maximum subset sum such that no two elements in set have same digit in them
- Find a number which give minimum sum when XOR with every number of array of integers
- Find a sub matrix with maximum XOR
- Check if a cycle of length 3 exists or not in a graph that satisfy a given condition
- Queries to check whether all the elements in the given range occurs even number of times
- Find letter's position in Alphabet using Bit operation
- Choose X such that (A xor X) + (B xor X) is minimized
- Number of ways to reach the end of matrix with non-zero AND value
- Longest Subarray having strictly positive XOR
- Find two integers A and B such that A ^ N = A + N and B ^ N = B + N
- Number formed by the rightmost set bit in N

Given a binary pattern patt and Q queries where each query consists of a range [L, R], for every query the task is to find… Read More »

Given an integer N, the task is to find the count of N-bit binary numbers without leading zeros. Examples: Input: N = 2 Output: 2… Read More »

Given a number N, the task is to find the maximum distance between two 1’s in the binary representation of given N. Print -1 if… Read More »

Given two positive integers A and B. Let’s define D such that B AND D = D. The task is to maximize the expression A… Read More »

Given an integer N, the task is to find whether the bits of N can be arranged in alternating manner i.e. either 0101… or 10101….… Read More »

Given a string str consisting of the characters from the set {‘o’, ‘n’, ‘e’, ‘z’, ‘r’}, the task is to to find the largest possible… Read More »

Given an array arr[] of n elements. The task is to find the count of elements which are equal to the XOR of the next… Read More »

Given two numbers A and B. The task is to find the smallest positive integer greater than or equal to 1 such that the sum… Read More »

Given an integer X. The task is to find and return the array containing of powers of 2’s and the xor of the array is… Read More »

Given an array of integers Arr. The task is to count the number of triplets (i, j, k) such that Ai ^ Ai+1 ^ Ai+2… Read More »

Given an array arr[] containing N integers and there are Q queries where each query consists of a range [L, R]. The task is to… Read More »

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

Given a positive integer N, the task is to count the total number of unset bits in the binary representation of all the numbers from… Read More »

Given an integer array, arr[] of size N. The XOR value of any subarray of arr[] is defined as the xor of all the integers… Read More »

Given an array arr[] containing N numbers. The task is to check whether the bitwise-AND of the given N numbers is even or odd. Examples:… Read More »