Find number of pairs in an array such that their XOR is 0

The problem “Find number of pairs in an array such that their XOR is 0” state that supposes, we have given an array of integers. The problem statement asks to find out the number of pairs present in an array, which has the pair Ai XOR Aj = 0. Note: …

Read moreFind number of pairs in an array such that their XOR is 0

Check in binary array the number represented by a subarray is odd or even

The problem “Check in binary array the number represented by a subarray is odd or even” states that you are given a binary array and a range. The array consists of the number in the form of 0s and 1s. The problem statement asks to find out the number represented …

Read moreCheck in binary array the number represented by a subarray is odd or even

Queries on XOR of greatest odd divisor of the range

Problem Statement The problem “Queries on XOR of greatest odd divisor of the range” states that you are given an array of integer and query q, each query consists of a range. The problem statement asks to find out the XOR of the greatest odd divisor within the given range …

Read moreQueries on XOR of greatest odd divisor of the range

Queries for counts of array elements with values in given range

Problem Statement The problem “Queries for counts of array elements with values in given range” states that you have an integer array and two number x and y. The problem statement asks to find out the count of numbers present in array that lies between the given x and y. …

Read moreQueries for counts of array elements with values in given range

Letter Case Permutation

In letter case permutation we have given a string consisting of alphabets and numbers only, each character in the string can be converted into lowercase and uppercase, find out all different strings which can be obtained from different combinations of lowercase and uppercase of each character in the string. Example …

Read moreLetter Case Permutation