Web Technologies
37.4K+ articles
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Strings
3.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Sorting
1.8K+ articles
Searching
1.7K+ articles
Given two integers N and M. The task is to determine the MEX (Minimal Excluded) of the following sequence: N ^ 0, N ^ 1, N ^ 2... N ^ M, where ^ is the Bitwise XOR operato...
read more
Bit Magic
Competitive Programming
Picked
Geeks Premier League
DSA
Geeks Premier League 2023
MEX (Minimal Excluded)
Given an array arr[] of size N, the task is to answer a set of Q queries, each in the format of queries[i][0] and queries[i][1]. For each queries[i], find the sum of Bitwi...
read more
Bit Magic
Geeks Premier League
DSA
Geeks Premier League 2023
Precomputation
Given an array arr[] of size N - 1 containing numbers between 1, 2... N, except one, the task is to find the missing number.Examples:Input: N = 5, arr[] = {2, 3, 1, 5}Outp...
read more
Bit Magic
Competitive Programming
Picked
DSA
CSES Problems
Your task is to calculate the number of bit strings of length N. For example, if N=3, the correct answer is 8, because the possible bit strings are 000, 001, 010, 011, 100...
read more
Bit Magic
Competitive Programming
Picked
DSA
Binary Exponentiation
CSES Problems
Given an integer N (1 ≤ N ≤ 1015), the task is to count the number of one bits in the binary representations of integers between 1 and N.Examples:Input: N = 7Output: 12Exp...
read more
Bit Magic
Competitive Programming
Picked
DSA
CSES Problems
Given an array workers[] and bikes[], which represents position of workers and bikes on a 2D plane, the task is to assign each worker to a bike based on the shortest Manha...
read more
Bit Magic
Dynamic Programming
Picked
DSA
Google
Algorithms-Dynamic Programming
Bitwise algorithms refer to the use of bitwise operators to manipulate individual bits of data. Python provides a set of bitwise operators such as AND (), OR (|), XOR (^),...
read more
Bit Magic
Algorithms
Picked
DSA
Bit Algorithms
Python-DSA
Bitwise algorithms are a category of algorithms that operate on individual bits within a data unit, rather than the entire data unit itself. They leverage bitwise operato...
read more
Bit Magic
DSA
Bitwise operations are fundamental to computer programming and problem-solving. At the intermediate level, you'll explore more complex bitwise algorithms and techniques to...
read more
Bit Magic
DSA
Given a task to find a number n. There is a pre-defined API int commonSetBits(int val) that returns the number of bits where both n and val have a value of 1 in the corres...
read more
Bit Magic
Picked
DSA
Intuit
Given two numbers a and b, the task is to swap them.Examples: Input: a = 2, b = 3Output: a = 3, b = 2Input: a = 20, b = 0Output: a = 0, b = 20Input: a = 10, b = 10Output: ...
read more
Bit Magic
Mathematical
DSA
Bit manipulation is a powerful technique often used in technical interviews to optimize space and time complexities by directly working with the binary representations of ...
read more
Bit Magic
Data Structures
Data Structures
This topic focuses on operations involving binary numbers and bitwise operators, which can lead to highly efficient solutions for complex problems. Bit manipulation often ...
read more
Bit Magic
DSA
Given an integer arrayarr[], return the sum ofHamming distancesbetween all the pairs of the integers inarr.The Hamming distance between two integers is the number of bit p...
read more
Bit Magic
DSA
Given an array arr[] of size n containing non-negative integers and also given a list of q queries in a 2D array queries[][], where each query is of the form [xi, mi]. For...
read more
Bit Magic
DSA
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !