# Category Archives: Bit Magic

Given an array arr[] consisting of N integers, the task is to find the total number of distinct subsequences having Binary Equivalence. A subsequence hasâ€¦ Read More
Given two arrays A[] and B[] of equal length, the task is to find the Bitwise XOR of the pairwise sum of the given twoâ€¦ Read More
Given a binary matrix arr[][] of dimensions M x N and Q queries of the form (x1, y1, x2, y2), where (x1, y1) and (x2,â€¦ Read More
Given an array arr[] consisting of N integers, the task is to find the maximum value of Bitwise AND of the first element with theâ€¦ Read More
Given an array arr[] of N positive integers. The task is to find the length of the shortest sub-sequence such that the GCD of theâ€¦ Read More
Given a list S that initially contains a single value 0. Below are the Q queries of the following types: 0 X: Insert X inâ€¦ Read More
Given two decimal numbers num1 and num2, the task is to count the number of times carry operation is required while adding the two givenâ€¦ Read More
Given an array arr[] of N integers, where N is an even number. The task is to divide the given N integers into two equalâ€¦ Read More
Given a binary string of length N, we need to find out how many substrings of this string contain only 1s. Examples:  Input: S =â€¦ Read More
The Google online challenge 2020 for summer internships 2021 was held on August 16. It was a 60-minute online test having 2 questions to code.â€¦ Read More
Given an array arr[] consisting of N integers and queries Q[][] of the form {L, R} where 0 â‰¤ L < R â‰¤ N –â€¦ Read More
Given a string S of length N which only contains lowercase alphabets. Find the length of the longest substring of S such that the charactersâ€¦ Read More
Given a natural number N, the task is to find the largest number M having the same length in binary representation as N such thatâ€¦ Read More
Given an integer N, the task is to find the total count of N-Digit numbers such that the Bitwise XOR of the digits of theâ€¦ Read More
Given an integer N, the task is to find the minimum number of bits required to be flipped to convert the binary representation of Nâ€¦ Read More