Skip to content

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

Start Your Coding Journey Now!