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
Tag Archives: Bitwise-OR
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
Given 3 integers A, B, and N the task is to perform alternate AND-OR operations on A and B, and then assign the result of… Read More
Given an array Arr of non-negative integers of size N, the task is to find the maximum possible OR between two numbers present in the… Read More
Given a number N and an integer K, the task is to set the Kth bit of the number N, i.e., if the Kth bit… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array A[] of length N, where N is an even number, the task is to answer Q independent queries where each query consists… Read More
Given an array arr[], and an integer K, the task is to maximize the bitwise OR of the array arr[], where each element of arr[]… Read More
Given two positive integers X and K, the task is to find the K-th smallest positive integer Y, such that X + Y = X… Read More