## Find max length odd parity substring

Given a binary string str, the task is to find the maximum length of the sub-string of str that has odd parity. A binary string… Read More »

## Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B

Given a binary string str of length N and two integers A and B such that 0 ≤ A < B < n. The task… Read More »

## Calculate score for the given binary string

Given a binary string str. For n-contiguous 1s the score is updated as score = score + n2 and for n-contiguous 0s, the score is… Read More »

## Check if all the 1’s in a binary string are equidistant or not

Given a binary string str, the task is to check if all the 1’s in the string are equidistant or not. The term equidistant means… Read More »

## Find the number of binary strings of length N with at least 3 consecutive 1s

Given an integer N. The task is to find the number of all possible distinct binary strings of length N which have at least 3… Read More »

## Generate all binary strings of length n with sub-string “01” appearing exactly twice

Given an integer N, the task is to generate all possible binary strings of length N which contain “01” as the sub-string exactly twice. Examples:… Read More »

## Maximum consecutive one’s (or zeros) in a binary circular array

Given a binary circular array of size N, the task is to find the count maximum number of consecutive 1’s present in the circular array.… Read More »

## Number of ways to make binary string of length N such that 0s always occur together in groups of size K

Given two integers N and K, the task is to count the number of ways to make a binary string of length N such that… Read More »

## Generate all the binary strings of N bits

Given a positive integer number N. The task is to generate all the binary strings of N bits. These binary strings should be in ascending… Read More »

## Minimum changes required such that the string satisfies the given condition

Given a binary string str. In a single operation, we can change any ‘1’ to ‘0’ or any ‘0’ to ‘1’. The task is to… Read More »

## Deletions of “01” or “10” in binary string to make it free from “01” or “10”

Given a binary string str, the task is to find the count of deletion of the sub-string “01” or “10” from the string so that… Read More »

## Bitwise AND of N binary strings

Given an array arr[] of binary strings, the task is to calculate the bitwise AND of all of these strings and print the resultant string.… Read More »

## Minimum number of moves to make a binary array K periodic

Given a binary array arr[] (containing only 0s and 1s) and an integer K. The task is to find the minimum number of moves to… Read More »

## Given two binary strings perform operation until B > 0 and print the result

Given two binary strings A and B of length N and M (up to 105). The task is to repeat the below process and find… Read More »

## Minimum number of given operations required to convert a string to another string

Given two strings S and T of equal length. Both strings contain only the characters ‘0’ and ‘1’. The task is to find the minimum… Read More »