Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.4K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Bit Magic
821+ articles
subarray
658+ articles
array-range-queries
376+ articles
Bitwise-AND
149+ articles
Bitwise-OR
122+ articles
Bitwise-XOR
443+ posts
Recent Articles
Nitika and her queries
Last Updated: 11 January 2024
Nitika recently read about XOR operation, and she got obsessed with it. She has an array a containing N Positive integers. She wants to perform Q queries on the array. In ...
read more
DSA
Bitwise-XOR
Arrays
Geeks Premier League 2023
Find Minimum Bitwise XOR By Removing Atmost One Element
Last Updated: 18 January 2024
Given an array A[] of length N. Then your task is to output the minimum possible bitwise XOR that can be obtained by removing at most one element. Examples:Input: N = 4, A...
read more
Bit Magic
DSA
Bitwise-XOR
Geeks Premier League 2023
Most Efficient Way to Find a Missing Number in an array
Last Updated: 24 May 2024
Have you wondered which is the most efficient way for a popular problem to find a missing Number? well in this post we are going to discuss this phenomenon in brief. First...
read more
DSA
GFacts
Bitwise-XOR
Prefix Xor Array
Last Updated: 24 July 2025
Given an arrayarr[]of sizeN, find the Prefix Xor of the array. A prefix xor array is another arrayprefixXor[]of the same size, such that the value ofprefixXor[i]isarr[0] ^...
read more
DSA
Bitwise-XOR
prefix
Complete Reference for Bitwise Operators in Programming/Coding
Last Updated: 18 November 2025
There exists no programming language that doesn't use Bit Manipulations. Bit manipulation is all about these bitwise operations. They improve the efficiency of programs by...
read more
Bit Magic
DSA
Bitwise-XOR
Bitwise-OR
Bitwise-AND
Programming
Bitwise Operators
Find the value of X and Y such that X Bitwise XOR Y equals to (X+Y)/2
Last Updated: 23 July 2025
Given an integer N, representing X ⊕ Y where ⊕ represents Bitwise XOR, the task is to find the value of X and Y such that X ⊕ Y = (X+Y)/2. If no possible value of X and Y ...
read more
DSA
Bitwise-XOR
Algorithms-Bit Algorithms
XOR Folding of a Grid
Last Updated: 11 January 2024
You are given a n*m grid containing 0s and 1s. In this grid-folding operation, you repeatedly choose any horizontal or vertical line to fold the grid along, replacing over...
read more
Bit Magic
Geeks Premier League
DSA
Bitwise-XOR
Geeks Premier League 2023
POTD Solutions | 30 Oct’ 23 | Sum of XOR of all pairs
Last Updated: 23 July 2025
View all POTD SolutionsWelcome to the daily solutions of our PROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an opti...
read more
DSA
Bitwise-XOR
Algorithms-Bit Algorithms
GFG-POTD-Solutions
Count Number of Pairs where Bitwise AND and Bitwise XOR is Equal
Last Updated: 23 July 2025
Given an integer array arr of size N, the task is to count the number of pairs whose BITWISE AND and BITWISE XOR are equal.Example:Input: N = 3, arr[] = {0,0,1}Output: 1Ex...
read more
Bit Magic
DSA
Bitwise-XOR
Data Structures
Bitwise-AND
Geeks Premier League 2023
XOR of Bitwise OR Pairs from Two Arrays
Last Updated: 31 December 2023
Given two integer arrays A[] and B[] of size N and M respectively. Another array C is formed of size N*M, containing Bitwise OR of all possible pairs of elements of A with...
read more
Bit Magic
Picked
DSA
Basic Coding Problems
Bitwise-XOR
Bitwise-OR
Minimum operations to convert given string into all 1s or 0s
Last Updated: 23 July 2025
Given a string S containing 0s and 1s of length N with X, the task is to output the minimum operations required to convert S into either all 1s or 0s. The operation is def...
read more
Strings
Geeks Premier League
DSA
Bitwise-XOR
Geeks Premier League 2023
Maximum XOR sublist of length K in Linked list
Last Updated: 29 November 2023
Given a linked list of integers and an integer value K, the task is to find the maximum XOR value of a sublist of length K in the linked list.Examples:Input: 4 - 6 - 9 - 7...
read more
Linked List
Geeks Premier League
DSA
Linked Lists
Bitwise-XOR
Geeks Premier League 2023
Maximum commulative XOR of elements with their indices
Last Updated: 23 July 2025
Given two integers N and K. Consider that there is an array A[] of 2N elements starting from 0. Then the task is to output the maximum cumulative XOR of elements with thei...
read more
Bit Magic
Geeks Premier League
DSA
Bitwise-XOR
Geeks Premier League 2023
Count Pairs with XOR Representable as Sum of Same Parity Primes
Last Updated: 23 July 2025
Given an array A[] of length N, the task is to count the number of distinct pairs of indices (i, j), such that, (A[i] XOR A[j]) can be expressed as the sum of two prime nu...
read more
Geeks Premier League
DSA
Arrays
Bitwise-XOR
Geeks Premier League 2023
Count valid Bitwise operation combinations for Binary Strings
Last Updated: 23 July 2025
Given an odd integer N (N = 3), a binary string S of length N and another string O of length (N-1)/2. Here, each character in string O can be one of the following: '', '|'...
read more
DSA
Bitwise-XOR
Bitwise-OR
Bitwise-AND
Maths
1
2
3
4
...
30