## Number of flips to make binary string alternate | Set 1

Given a binary string, that is it contains only 0s and 1s. We need to make this string a sequence of alternate characters by flipping… Read More »

- Maximum contiguous 1 possible in a binary string after k rotations
- Number of Binary Strings of length N with K adjacent Set Bits
- Divide binary array into three equal parts with same value
- Check if a binary string has two consecutive occurrences of one everywhere
- Minimum number of 1's to be replaced in a binary array
- Minimum swaps required to convert one binary string to another
- Recursive Program for Binary to Decimal
- Minimum number of operations required to sum to binary string S
- Occurrences of a pattern in binary representation of a number
- Length of longest consecutive ones by at most one swap in a Binary String
- Minimum swaps required to make a binary string alternating
- Minimum number of given operations required to convert a string to another string
- Number of steps required to convert a binary number to one
- Count of values of x <= n for which (n XOR x) = (n - x)
- Check if moves in a stack or queue are possible or not
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Count of cyclic permutations having XOR with other binary string as 0
- Generate all the binary strings of N bits
- Check if a binary string contains consecutive same or not
- Bitwise AND of N binary strings
- Ways to divide a binary array into sub-arrays such that each sub-array contains exactly one 1
- Number of unique permutations starting with 1 of a Binary String
- Minimum steps to remove substring 010 from a binary string
- Lucky alive person in a circle | Set - 2
- Check If every group of a's is followed by a group of b's of same length
- Check if it is possible to rearrange a binary string with alternate 0s and 1s
- Construct a binary string following the given constraints
- Minimum number of moves to make a binary array K periodic
- Find the n-th binary string in sorted order
- Find Bit whose minimum sequence flips makes all bits same

Given a binary string, that is it contains only 0s and 1s. We need to make this string a sequence of alternate characters by flipping… Read More »

Given a binary string (consists of only 0 and 1). If there is “100” as a sub-string in the string, then we can delete this… Read More »

Given a binary string, find if it is possible to make all its digits equal (either all 0’s or all 1’s) by flipping exactly one… Read More »

Given a number n, find all binary sequences of length 2n such that sum of first n bits is same as sum of last n… Read More »

Given a string containing of ‘0’, ‘1’ and ‘?’ wildcard characters, generate all binary strings that can be formed by replacing each wildcard character by… Read More »

Given a binary string, count minimum number of subsequences to be removed to make it an empty string. Examples : Input: str[] = “10001” Output:… Read More »

Given a number n, count number of n length strings with consecutive 1’s in them. Examples: Input : n = 2 Output : 1 There… Read More »

Given two binary arrays arr1[] and arr2[] of same size n. Find length of the longest common span (i, j) where j >= i such… Read More »

Given a binary string, count number of substrings that start and end with 1. For example, if the input string is “00100101”, then there are… Read More »

Given a binary array sorted in non-increasing order, count the number of 1’s in it. Examples: Input: arr[] = {1, 1, 0, 0, 0, 0,… Read More »

Generate all permutations of given length such that every permutation has more or equal 1’s than 0’s in all prefixes of the permutation. Examples: Input:… Read More »

Given a positive integer N, count all possible distinct binary strings of length N such that there are no consecutive 1’s. Examples: Input: N =… Read More »

Given two bit sequences as strings, write a function to return the addition of the two sequences. Bit strings can be of different lengths also.… Read More »