Tutorials
Courses
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
Misc
8.8K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Competitive Programming
3.3K+ articles
Greedy
2.1K+ articles
Matrix
1.3K+ articles
Bit Magic
1.2K+ articles
setBitCount
127+ articles
binary-representation
154+ posts
Recent Articles
Popular Articles
Tower of Hanoi | Set 2
Last Updated: 28 February 2022
Given a positive integer N representing the number of disks in the Tower of Hanoi, the task is to solve the Tower of Hanoi puzzle using Binary representations.Examples:Inp...
read more
Backtracking
Mathematical
Recursion
Puzzles
DSA
binary-representation
Reduce a number to 1 by performing given operations | Set 3
Last Updated: 27 December 2021
Given an integer N, the task is to find the number of steps required to reduce the given number N to 1 by performing the following operations:If the number is a power of 2...
read more
Bit Magic
Mathematical
DSA
setBitCount
binary-representation
maths-power
Largest Prime Number possible from a subsequence of a Binary String
Last Updated: 01 February 2023
Given a Binary string, the task is to find the largest Prime Number possible by the decimal representation of a subsequence of the given binary string. If no prime number ...
read more
Strings
Bit Magic
Algorithms
Mathematical
Data Structures
DSA
subsequence
binary-string
binary-representation
Prime Number
Find a pair of numbers with set bit count as at most that of N and whose Bitwise XOR is N
Last Updated: 12 October 2022
Given a positive integer N, the task is to find the pair of integers (X, Y) such that the Bitwise XOR of X and Y is N and X * Y is maximum where the count of bits in X and...
read more
Bit Magic
Greedy
Mathematical
DSA
setBitCount
binary-representation
Bitwise-XOR
Find sum of XNOR of all unordered pairs from given Array
Last Updated: 15 February 2023
Given an array arr[] of size N, the task is to find the sum of all XNOR values of all possible unordered pairs from the given array.Examples:Input: N = 5, arr[] = {2, 2, 2...
read more
Bit Magic
Mathematical
Python
DSA
Arrays
setBitCount
binary-representation
Find if 0 is removed more or 1 by deleting middle element if consecutive triplet is divisible by 3 in given Binary Array
Last Updated: 21 February 2022
Given a binary array a[] of size N of 1's and 0's. The task is to remove an element if a[i-1]+a[i]+a[i+1] is divisible by 3. Print 1 if more number of 1's are removed than...
read more
Misc
Bit Magic
Mathematical
DSA
Arrays
binary-representation
Binary numbers of N digits
Last Updated: 13 January 2022
Given a positive integer number N. The task is to generate all the binary numbers of N digits. These binary numbers should be in ascending order.Examples:Input: 2Output:00...
read more
Bit Magic
Mathematical
DSA
number-digits
binary-representation
Generate all binary numbers in range [L, R] with same length
Last Updated: 23 December 2021
Given two positive integer numbers L and R. The task is to convert all the numbers from L to R to binary number. The length of all binary numbers should be same.Examples:I...
read more
Bit Magic
Mathematical
DSA
binary-representation
Convert all numbers in range [L, R] to binary number
Last Updated: 24 December 2021
Given two positive integer numbers L and R. The task is to convert all the numbers from L to R to binary number.Examples:Input: L = 1, R = 4Output:11011100Explanation: The...
read more
Bit Magic
Mathematical
DSA
binary-representation
Make given Binary array of size two to all 0s in a single line
Last Updated: 14 July 2022
Given a binary array arr[N], (where N = 2) of size two having at least one element as zero. The task is to write a single line function to set both elements of the array t...
read more
C++ Programs
Algo Geek
DSA
Arrays
binary-representation
cpp-array
Count the number of mappings in given binary matrix based on given conditions
Last Updated: 04 February 2022
Given a binary matrix of size M*N containing only 0 and 1. The task is to count the number of mappings in the matrix. There is one mapping between any two 1s if the follow...
read more
Matrix
Algo Geek
Algo-Geek 2021
DSA
Arrays
binary-representation
Minimum swaps to group all 0s together in Binary Circular Array
Last Updated: 28 January 2022
Given a binary circular array arr[] of size N, the task is to find the minimum swaps to group all 0s together in the array.Examples:Input: arr[] = {1, 0, 1, 0, 0, 1, 1}Out...
read more
Mathematical
Competitive Programming
Algo Geek
DSA
Arrays
binary-representation
sliding-window
circular-array
Swap-Program
Minimum operations to set given coordinates as 1 by choosing a set bit index and changing whole row to 1
Last Updated: 22 February 2022
Given a binary matrix arr[][] having N rows and M columns, the task is to calculate the minimum number of operations required to set the value of the coordinate (x, y) as ...
read more
Greedy
Matrix
DSA
setBitCount
binary-representation
Maximize minority character deletions that can be done from given Binary String substring
Last Updated: 17 March 2022
PythonGiven binary string str of size, N. Select any substring from the string and remove all the occurrences of the minority character (i.e. the character having less fre...
read more
Greedy
DSA
Arrays
binary-representation
Check if level-wise Decimal equivalent of Binary Tree forms a Monotonic sequence or not
Last Updated: 21 March 2023
Given the root of a binary tree in which all nodes has values either 0 or 1, the task is to check if the level-wise decimal equivalent of given Tree forms a monotonic sequ...
read more
Tree
Pattern Searching
Geeks Premier League
Geeks-Premier-League-2022
DSA
Binary Tree
binary-representation
tree-level-order
1
2
3
4
...
11
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 !