## XOR Encryption by Shifting Plaintext

Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its… Read More »

Here is a cipher algorithm, based on hexadecimal strings that is implemented by XORing the given plaintext, N number of times where N is its… Read More »

You are given a sequence of N integers and Q queries. In each query, you are given two parameters L and R. You have to… Read More »

Given an array arr[] of n integers and some queries. Each query is of the form (L, R), where L and R are indices of… Read More »

A Levelwise OR/XOR alternating segment tree is a segment tree, such that at every level the operations OR and XOR alternate. In other words at… Read More »

Given two strings which are of lengths n and n+1. The second string contains all the character of the first string, but there is one… Read More »

You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and… Read More »

We are given an array arr[] of size n. Numbers are from 1 to (n-1) in random order. The array has only one repetitive element.… Read More »

Given an integer N, we need to find three integers(X, Y, Z) which can form a triangle with the following conditions: Lengths of sides are… Read More »

Given N numbers with no duplicates, count the number of unique triplets (ai, aj, ak) such that their XOR is 0. A triplet is said… Read More »

You are given two positive integer n and k. You have to calculate the maximum possible XOR value of at most k-elements from 1 to… Read More »

Given two numbers say a and b. Print their XOR after making the lengths of their binary representation equal by adding trailing zeros to the… Read More »

Let us consider the following problem to understand Segment Trees. We have an array arr[0 . . . n-1]. We should be able to 1… Read More »

Given an array of n integers, find the sum of xor of all pairs of numbers in the array. Examples : Input : arr[] =… Read More »

Given two integer numbers, whenever the bits of the first number is set i.e. 1, toggle the bits of the second number leaving the rest… Read More »

Given four positive integers, determine if there’s a rectangle such that the lengths of its sides are a, b, c and d (in any order).… Read More »