Skip to content

Tag Archives: Bitwise-OR

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
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

Start Your Coding Journey Now!