## Modify a binary array to Bitwise AND of all elements as 1

Given an array a[] consisting only 0 and 1. The task is to check if it is possible to transform the array such that the… Read More »

- Minimum given operations required to convert a given binary string to all 1's
- Minimum operations required to convert a binary string to all 0s or all 1s
- Modulo of a large Binary String
- Count number of binary strings such that there is no substring of length greater than or equal to 3 with all 1's
- Minimum number of Binary strings to represent a Number

Given an array a[] consisting only 0 and 1. The task is to check if it is possible to transform the array such that the… Read More »

Give an integer array arr[] consisting of elements from the set {0, 1}. The task is to print the number of ways the array can… Read More »

Given a binary string str consisting of characters ‘0’ and ‘1’. The task is to find whether the string is valid or not. A string… Read More »

Given a string str consisting of only characters ‘a’ and ‘b’, the task is to check whether the string is valid or not. In a… Read More »

Given an integer n, the task is to find the number of possible values of 0 ≤ x ≤ n which satisfy n XOR x… Read More »

Given two integers n and m where n is the number of 0s and m is the number of 1s. The task is to print… Read More »

Given a positive integer n, the task is to find the nth string in the following infinite list of all possible strings over two symbols… Read More »

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

Given a binary number as string, find its decimal equivalent. Examples: Input : binary = “101” Output : 5 Input : binary = “1111” Output… Read More »

Given a binary string S. Find the minimum number of operations required to be performed on the number zero to convert it to the number… Read More »

Given a binary array, where 1 denotes push operation and 0 denotes a pop operation in a stack or queue. The task is to check… Read More »

Given and . The task is to find the number of binary strings of length n out of 2n such that they satisfy f(bit string)… Read More »

Given three integers A, B and X. The task is to construct a binary string str which has exactly A number of 0’s and B… Read More »

Given a string str, the task is to check whether every group of consecutive a’s is followed by a group of consecutive b’s of same… Read More »

Given a Binary String of length . It is allowed to do at most one swap between any 0 and 1. The task is to… Read More »