Skip to content

Tag Archives: Bitwise-AND

Given an array arr[] consisting of N positive integers, the task is to find the sum of Bitwise AND of all possible triplets (arr[i], arr[j],… Read More
Given a positive integer N, the task is to count all numbers which are less than N and Bitwise AND of all such numbers with… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum sum of any subsequence from the array having Bitwise AND… Read More
Given two arrays A[] and B[] of sizes N, the task is to find the maximum sum of Bitwise AND of same-indexed elements in the… Read More
Given an array arr[] consisting of N positive integers, the task is to find the Bitwise OR of Bitwise AND of all subarrays of the… Read More
Given two arrays arr1[] and arr2[] consisting of N and M integers respectively, the task is to print the Bitwise XOR of Bitwise AND of… Read More
Given an array arr[] consisting of N integers and integer K, the task is to find the smallest integer X with exactly K set bits… Read More
Given a square symmetric matrix mat[][] of size N, the task is to find the minimum sum possible of an array arr[] of size N,… Read More
Given an array arr[] consisting of N positive integers and a 2D array Q[][] consisting of queries of the type {i, val}, the task for… Read More
Given a binary matrix mat[][] of dimensions N * N, the task is to check if Bitwise AND of the decimal numbers obtained by concatenating… Read More
Given an array arr[] of size N, the task is to count the number of pairs from the given array such that the Bitwise AND… Read More
Given an array arr[] consisting of values of N vertices of an initially unconnected Graph and an integer M, the task is to connect some… Read More
Given an array arr[] consisting of N non-negative integers and an integer M, the task is to find the count of unordered pairs {X, Y}… Read More
Given a positive integer N, the task is to check whether the given integer is an even power of 2 or not. Examples: Input: N… Read More
Given an array arr[] consisting of N positive integers, the task is to find the maximum sum of Bitwise AND of same-indexed elements of permutation… Read More