Given an integer N(1 ≤ N ≤ 500), Construct an integer arr[] of length N, such that it should follow all the given conditions below: … Read More

# Tag Archives: Bitwise-XOR

In a party of N people, each person is denoted by an integer. Couples are represented by the same number. Find out the only single… Read More

Given an arr[] of positive integers of length N. Player X and Y plays a game where in each move one person chooses two elements… Read More

Given an integer N, the task is to find all the factors (excluding itself) of the number N and their XOR. Examples: Input: N =… Read More

Given two arrays A[] and B[] of length N and M respectively and a prime number X, the task is to find the number of… Read More

Given two positive integers A and B, the task is to find the number of integers X such that (A⊕X ) & B = 0… Read More

Given a positive integer N, the task is to find all pairs of integers (i, j) from the range [1, N] in increasing order of… Read More

Given binary strings S1 and S2 of length N, the task is to check if S2 can be made equal to S1 by performing the… Read More

Given two integers X and Y, and an integer K, the task is to find the minimum number of operations to make X equal to… Read More

Given four numbers L, R, K, and X, the task is to find K distinct decimal numbers in the range [L, R] such that their… Read More

Given an integer N, the task is to construct an array of N distinct elements (arr[i] ≤ N+1) such that the bitwise XOR of every… Read More

Given an array arr[] of size N and an integer K, the task is to find the count of all the ordered pairs (i, j)… Read More

Given two integers S and X representing the sum and bitwise XOR respectively of two integers, the task is to find the count of all… Read More

Given an array arr of length N of distinct numbers and an integer X, the task is to find the minimum number of elements that… Read More

Given an array arr[] of size N, the task is to find if there exists a pair in the array, such that their bitwise XOR… Read More