## Number of binary strings such that there is no substring of length ≥ 3

Given an integer N, the task is to count the number of binary strings possible such that there is no substring of length ≥ 3… Read More »

## Minimum number of swaps to make two binary string equal

Given two binary strings of equal length, the task is to find the minimum number of swaps to make them equal. Swapping between two characters… Read More »

## Check if all bits can be made same by flipping two consecutive bits

Given a binary string, the task is to find whether all the digits of the string can be made equal i.e either 0 or 1… Read More »

## Maximize the number of palindromic Strings

Given N binary strings b1, b2, b3…. bn. The task is to find the maximum number of binary strings that you can make palindromic by… Read More »

## Count of 1-bit and 2-bit characters in the given binary string

Given two special characters, the first character can be represented by one bit which is 0 and the second character can be represented by two… Read More »

## Longest sub-sequence of a binary string divisible by 3

Given a binary string S of length N, the task is to find the length of the longest sub-sequence in it which is divisible by… Read More »

## Number of sub-sequences of non-zero length of a binary string divisible by 3

Given a binary string S of length N, the task is to find the number of sub-sequences of non-zero length which are divisible by 3.… Read More »

## Minimum swaps required to make a binary string divisible by 2^k

Given a binary string S of length N and an integer K, the task is to find the minimum number of adjacent swaps required to… Read More »

## Find the number obtained after concatenation of binary representation of M and N

Given two integers M and N the task is to find the number formed by concatenating the binary equivalents of M and N i.e. M… Read More »

## Number of sub-strings in a given binary string divisible by 2

Given a binary string str of length N, the task is to find the count of substrings of str which are divisible by 2. Leading… Read More »

## XOR two binary strings of unequal lengths

Given two binary string of unequal lengths A and B, the task is to print the binary string which is the XOR of A and… Read More »

## Largest sub-string of a binary string divisible by 2

Given a binary string str of length N, the task is to find the longest sub-string divisible by 2. If no such sub-string exists then… Read More »

## Number of subsequences in a given binary string divisible by 2

Given a binary string str of length N, the task is to find the count of subsequences of str which are divisible by 2. Leading… Read More »

## Minimum cost to partition the given binary string

Given a binary string str and an integer K, the task is to find the minimum cost required to partition the string into exactly K… Read More »

## Generate Binary Strings of length N using Branch and Bound

The task is to generate a binary string of length N using branch and bound technique Examples: Input: N = 3 Output: 000 001 010… Read More »