## Maximum Bitwise AND value of subsequence of length K

Given an array a of size N and an integer K. The task is to find the maximum bitwise and value of elements of any… Read More »

- Sum of bitwise AND of all submatrices
- Count pairs of elements such that number of set bits in their AND is B[i]
- Position of the K-th set bit in a number
- Find letter's position in Alphabet using Bit operation
- Bitwise AND of N binary strings
- Queries for bitwise AND in the index range [L, R] of the given array
- Partition the array in K segments such that bitwise AND of individual segment sum is maximized
- Bitwise AND of sub-array closest to K
- Total pairs in an array such that the bitwise AND, bitwise OR and bitwise XOR of LSB is 1
- Minimum value among AND of elements of every subset of an array
- Queries for bitwise AND in the given matrix
- Find smallest positive number Y such that Bitwise AND of X and Y is Zero
- Maximum Bitwise AND value of subsequence of length K

Given an array a of size N and an integer K. The task is to find the maximum bitwise and value of elements of any… Read More »

Given an integer X. The task is to find the the smallest positive number Y(> 0) such that X AND Y is zero. Examples: Input… Read More »

Given an array of size N and an integer K. The task is to partition the array in K segments such that bitwise AND of… Read More »

Given two arrays A[] and B[] of N elements each. The task is to find the number of index pairs (i, j) such that i… Read More »

Given an N * N matrix mat[][] consisting of non-negative integers and some queries consisting of top-left and bottom-right corner of the sub-matrix, the task… Read More »

Given an array arr[] of N and Q queries consisting of a range [L, R]. the task is to find the bit-wise AND of all… Read More »

Given a string of English alphabets. The task is, for every character in the string print its position in the English alphabets. Note: The characters… Read More »

Given an integer array arr[] of size N and an integer K, the task is to find the sub-array arr[i….j] where i ≤ j and… Read More »

Given an array arr[] of size N. The task is to find the number of pairs (arr[i], arr[j]) as cntAND, cntOR and cntXOR such that:… Read More »

Given two numbers N and K. The task is to find the index of the K-th set bit in the number from the right. Note:… Read More »

Given an array of integers, the task is to find the AND of all elements of each subset of the array and print the minimum… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given an array arr[] of binary strings, the task is to calculate the bitwise AND of all of these strings and print the resultant string.… Read More »

Given a range [L, R], the task is to find a pair (X, Y) such that L ≤ X < Y ≤ R and X… Read More »

Given an array consisting of N positive integers, find the sum of bit-wise and of all possible sub-arrays of the array. Examples: Input : arr[]… Read More »