## Minimum operations required to convert a binary string to all 0s or all 1s

Given a binary string str, the task is to find the minimum number of operations required to make all the characters of the string same… Read More »

- Generate all the binary strings of N bits
- Find the number of binary strings of length N with at least 3 consecutive 1s
- Optimally accommodate 0s and 1s from a Binary String into K buckets
- Maximum consecutive one’s (or zeros) in a binary circular array
- Find if it is possible to make a binary string which contanins given number of "0", "1" , "01" and "10" as sub sequences
- Check if all the 1's in a binary string are equidistant or not
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Count of non-overlapping sub-strings "101" and "010" in the given binary string
- Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B
- Generate all binary strings of length n with sub-string "01" appearing exactly twice
- Rearrange given string to maximize the occurrence of string t
- Longest sub string of 0's in a binary string which is repeated K times
- Number of ways to make binary string of length N such that 0s always occur together in groups of size K
- Minimum operations required to convert a binary string to all 0s or all 1s
- Minimum changes required such that the string satisfies the given condition
- Check whether str1 can be converted to str2 with the given operations
- Calculate score for the given binary string
- Find max length odd parity substring
- Minimum number of Binary strings to represent a Number

Given a binary string str, the task is to find the minimum number of operations required to make all the characters of the string same… Read More »

Given a number N. The task is to find the minimum number of binary strings required to represent the given number as the sum of… Read More »

Given binary string S of size N and a number K. The task is to find the Longest sub string of 0’s in the string… Read More »

Given a binary string str, the task is to find the count of non-overlapping sub-strings of either the form “010” or “101”. Examples: Input: str… Read More »

Given a binary string S, consisting of 0’s and 1’s. You have to accommodate the 0’s and 1’s into the K buckets in such a… Read More »

Given two binary strings str1 and str2. The task is to check whether it is possible to convert str1 to str2 by applying the below… Read More »

Given four integers l, m, x and y. The task is to check whether it is possible to make a binary string consisting of l… Read More »

Given two binary strings s and t. The task is to rearrange the string s in such a way that the occurrence of string t… Read More »

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 »

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

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 »

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 »

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 »

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 »

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 »