## Longest subsegment of ‘1’s formed by changing at most k ‘0’s

Given a binary array a[] and a number k, we need to find length of he longest subsegment of ‘1’s possible by changing at most… 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
- Check if a binary string has two consecutive occurrences of one everywhere
- Recursive Program for Binary to Decimal
- Divide binary array into three equal parts with same value
- Minimum swaps required to convert one binary string to another
- Minimum number of 1's to be replaced in a binary array
- Occurrences of a pattern in binary representation of a number
- Minimum number of operations required to sum to binary string S
- Minimum number of given operations required to convert a string to another string
- Length of longest consecutive ones by at most one swap in a Binary String
- Minimum swaps required to make a binary string alternating
- Check if moves in a stack or queue are possible or not
- Count of values of x <= n for which (n XOR x) = (n - x)
- Count of cyclic permutations having XOR with other binary string as 0
- Check if a binary string contains consecutive same or not
- Ways to divide a binary array into sub-arrays such that each sub-array contains exactly one 1
- Lucky alive person in a circle | Set - 2
- Minimum steps to remove substring 010 from a binary string
- Check If every group of a's is followed by a group of b's of same length
- Construct a binary string following the given constraints
- Check if it is possible to rearrange a binary string with alternate 0s and 1s
- Maximum Consecutive Zeroes in Concatenated Binary String
- Minimum number of moves to make a binary array K periodic
- Find Bit whose minimum sequence flips makes all bits same
- Find the n-th binary string in sorted order
- Minimum steps to convert one binary string to other only using negation
- Print n 0s and m 1s such that no two 0s and no three 1s are together
- Remove one bit from a binary number to get maximum value
- Modify a binary array to Bitwise AND of all elements as 1

Given a binary array a[] and a number k, we need to find length of he longest subsegment of ‘1’s possible by changing at most… Read More »

Given a binary string of 0s and 1s. The task is to find the length of substring which is having maximum difference of number of… Read More »

Given a string containing characters ‘a’ and ‘b’ only. Convert the given string into a string in which there is no ‘ab’ substring. To make… Read More »

Given a binary array, we can flip all the 1 are in the left part and all the 0 to the right part.Calculate the minimum… Read More »

Given a binary array, the task is find the size of the largest sub_sequence which having equal number of zeros and one. Examples : Input… Read More »

Given an integer n. Find a string of characters ‘a’ and ‘b’ such that the string doesn’t contain any palindrome of length 3. Examples: Input… Read More »

Given a binary string, find the longest subsequence of the form (0)*(1)*(0)* in it. Basically we need to divide the string into 3 non overlapping… Read More »

Given a binary array, find length of the longest subsequence such that there is no 0 after a 1. Examples: Input : 1 1 0… Read More »

Given a binary string, we need to check whether that number is divisible by 64 or not after removing of some bits. If yes then… Read More »

Given an encoding of a binary string of length k, the task is to find if the given encoding uniquely identifies a binary string or… Read More »

Given a binary string. We need to find the length of longest balanced sub string. A sub string is balanced if it contains equal number… Read More »

Given a binary string s and two integers x and y are given. Task is to arrange the given string in such a way so… Read More »

Given a binary string of length N and an integer K, we need to find out how many substrings of this string are exist which… Read More »

Given a positive integer n, print all n-bit binary numbers having more 1’s than 0’s for any prefix of the number. Examples: Input : n… Read More »

Given a binary array, sort it using one traversal and no extra space. Examples : Input : 1 0 0 1 0 1 0 1… Read More »