## Longest Span with same Sum in two Binary arrays

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 »

- 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
- Final string after performing given operations

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 »