Skip to content

Tag Archives: Bitwise-OR

Given an integer N (N is odd). the task is to construct an array arr[] of size N where 1 ≤ arr[i] ≤ N such… Read More
Given 2 arrays arr1[] and arr2[], of size N and M respectively, the task is to find a pair of value (say a and b)… Read More
Given an integer N, the task is to find the number of pairs (say {a, b})from 1 to N (both inclusive) that satisfies the condition: … Read More
Given a binary string str, the task is to find the maximum possible OR value of any two substrings of the binary string str. Examples:… Read More
Bit stands for binary digit. A bit is the basic unit of information and can only have one of two possible values that is 0… Read More
Given an array A[] consisting of N elements, the task is to find the minimum length of the subarray starting from each index and the… Read More
Given an array A[] of size N, the task is to find the last remaining element in a new array B containing all pairwise bitwise… Read More
Given an array of size N. Consider all the subarrays starting at each index from [0, N – 1]. Determine the length of the smallest… Read More
Given an integer N denoting the size of an array and two arrays containing Bitwise AND and Bitwise OR of adjacent elements of the array… Read More
Given an array arr[], consisting of N integers, the task is to find the minimum number of moves required to make all numbers in the… Read More
Given an integer N, the task is to find all possible integer M in the range [2, N] such that the bitwise OR of all… Read More
Given two positive integers A and B. The task is to make them equal using minimum operations such that:  A = A + 1 (increase… Read More
Given an array A[] of length N and an integer K, the task is to maximize the value of expression [i.j – K.(Ai | Aj)]… Read More
Given an array arr[] of size N. Find the minimum sum of the array after performing given operations any number of times: Select two different… Read More
Given a binary string str of length N, the task is to find the number of setbits in the bitwise OR of all the K… Read More

Start Your Coding Journey Now!