##
Subarray with XOR less than k
August 6, 2017

Given an array of n numbers and a number k. You have to write a program to find the number of subarrays with xor less… Read More »

August 6, 2017

Given an array of n numbers and a number k. You have to write a program to find the number of subarrays with xor less… Read More »

July 28, 2017

Given an array of N positive integers. There are Q queries, each include a range [L, R]. For each query output the xor of greatest… Read More »

July 19, 2017

Given a binary string, task is to erase exactly one integer in the array so that the XOR of the remaining numbers is zero. The… Read More »

July 3, 2017

Given an array of n integers. Find out number of pairs in array whose XOR is odd. Examples: Input : arr[] = { 1, 2,… Read More »

June 28, 2017

You are given a number of queries Q and each query will be of the following types: Query 1 : add(x) This means add x… Read More »

June 14, 2017

We have an array arr[0 . . . n-1]. There are two type of queries Find the XOR of elements from index l to r… Read More »

June 7, 2017

Given an array of integers, we need to get total XOR of all subarray XORs where subarray XOR can be obtained by XORing all elements… Read More »

May 15, 2017

Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions: 0 <= a <= x a XOR x = a… Read More »

May 10, 2017

Given a range [L, R], we need to find two integers in this range such that their XOR is maximum among all possible choices of… Read More »

May 9, 2017

Given an array ‘arr1’ of n positive integers. Contents of arr1[] are copied to another array ‘arr2’, but numbers are shuffled and one element is… Read More »

May 3, 2017

We are given a string. We are also given indexes of first and last characters in string. The task is to reverse the string without… Read More »

April 20, 2017

Given an array of integers arr[] and a number m, count the number of subarrays having XOR of their elements as m. Examples: Input :… Read More »

March 30, 2017

March 26, 2017

Given a integer ‘x’, find the number of values of ‘a’ satisfying the following conditions: a XOR x > x 0 < a < x… Read More »

March 22, 2017

Given an array of integers. All numbers occur twice except one number which occurs once. Find the number in O(n) time & constant extra space.… Read More »