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… Read More

# Tag Archives: binary-representation

Python Given binary string str of size, N. Select any substring from the string and remove all the occurrences of the minority character (i.e. the… Read More

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… Read More

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… Read More

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.… Read More

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… Read More

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… Read More

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… Read More

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:… Read More

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.… Read More

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… Read More

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… Read More

Given two binary arrays, A[] and B[] of size N respectively, the task is to find the number of elements in array A[] that will… Read More

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… Read More

Given two integers A and B, the task is to count possible values of X that satisfies the condition A | X = B. Note:… Read More