Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Greedy
2.1K+ articles
Algorithms
2.0K+ articles
Bit Magic
1.2K+ articles
Bitwise-XOR
443+ articles
Bitwise-AND
149+ articles
Bitwise-OR
1.6K+ posts
Recent Articles
Popular Articles
Maximum bitwise OR one of any two Substrings of given Binary String
Last Updated: 28 March 2023
Given a binary string str, the task is to find the maximum possible OR value of any two substrings of the binary string str.Examples:Input: str = "1110010"Output: "1111110...
read more
Strings
Mathematical
Technical Scripter
Technical Scripter 2022
DSA
Bitwise-OR
Number of unique pairs whose bitwise XOR and OR are same
Last Updated: 21 May 2024
Given an integer N, the task is to find the number of pairs (say {a, b})from 1 to N (both inclusive) that satisfies the condition:a and b are distinct elements.The values ...
read more
Bit Magic
Technical Scripter
Technical Scripter 2022
DSA
Bitwise-XOR
Bitwise-OR
Find pair whose bitwise OR and bitwise AND follows the given condition
Last Updated: 28 April 2025
Given 2 arrays arr1[] and arr2[], of size N and M respectively, the task is to find a pair of value (say a and b) such that the following conditions are satisfied:(a | b) ...
read more
Bit Magic
Technical Scripter
Technical Scripter 2022
DSA
Arrays
Bitwise-OR
Bitwise-AND
Generate Array whose average and bitwise OR of bitwise XOR are equal
Last Updated: 24 April 2023
Given an integer N (N is odd). the task is to construct an array arr[] of size N where 1 ? arr[i] ? N such that the bitwise OR of the bitwise XOR of every consecutive pair...
read more
Technical Scripter
Technical Scripter 2022
DSA
Arrays
Bitwise-XOR
Bitwise-OR
Minimizing Bitwise-OR with XOR Operation on an Array
Last Updated: 29 November 2023
Given an array arr[] of non-negative integers where arr[i] = 0, the task is to select a non-negative integer 'k' and perform the bitwise-XOR operation on every element of ...
read more
Bit Magic
DSA
Arrays
Bitwise-XOR
Bitwise-OR
Maximizing Profits using Bitwise OR
Last Updated: 06 November 2023
Given two integers N, K and two integer arrays weights[] and profits[] each of size N where weights[i] is the weight associated with the ith item and profit[i] is the prof...
read more
Bit Magic
Recursion
DSA
Arrays
Arrays
Bitwise-OR
Count valid Bitwise operation combinations for Binary Strings
Last Updated: 07 November 2023
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
Bit Magic
Competitive Programming
DSA
Bitwise-XOR
Bitwise-OR
Bitwise-AND
Maths
Find number of path with same moves in full Binary Tree
Last Updated: 23 March 2024
Consider a Binary Tree having N nodes having root equal to 1. In which for any node X, the left and right child are 2*X and ((2*X) + 1). Then in such a Binary Tree, there ...
read more
Tree
Geeks Premier League
DSA
Binary Tree
Binary Search
Bitwise-OR
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
Number of subarray's of K size with Even Bitwise-OR
Last Updated: 10 January 2024
You are given an array arr[] containing n integers and an integer k. Find the number of subarrays of arr with length k whose bitwise OR is even.Examples:Input: arr[] = {4,...
read more
Geeks Premier League
Sliding Window 23
DSA
sliding-window
Bitwise-OR
Maximum Strings Concatenation
Last Updated: 10 January 2024
Given an array of strings, where each string consists of lowercase characters from a to j. You need to find the maximum number of strings that can be concatenated together...
read more
Bit Magic
Geeks Premier League
DSA
setBitCount
Bitwise-OR
Geeks Premier League 2023
Complete Reference for Bitwise Operators in Programming/Coding
Last Updated: 28 December 2023
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
Non-Repeating Bitwise OR Permutation
Last Updated: 09 January 2024
Given an integer N (N = 3). Then the task is to output a permutation such that the bitwise OR of the previous two elements is not equal to the current element, given that ...
read more
Bit Magic
Geeks Premier League
DSA
permutation
Greedy Algorithms
Bitwise-OR
Geeks Premier League 2023
Check if an Array exists with Bitwise OR as A and Bitwise AND as B
Last Updated: 09 January 2024
Three integers N, A and B are given to you. you need to create an array arr of length 'N' such that it satisfies the following conditions :Each elements of arr should be u...
read more
DSA
Arrays
Bitwise-OR
Bitwise-AND
Minimum Increment or Bitwise OR operations to make two integers equal
Last Updated: 05 March 2024
Given two integers X and Y (X Y), we can perform the following operations any number of times: Increment X by 1, X = X + 1Increment Y by 1, Y = Y + 1 Change X to X | Y, X...
read more
Bit Magic
Competitive Programming
Picked
Geeks Premier League
DSA
Bitwise-OR
Geeks Premier League 2023
1
2
3
4
...
106
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 !