## Find Bit whose minimum sequence flips makes all bits same

Given a binary string consisting only of 1’s and 0’s. Find the bit (output is either 1 or 0)whose the minimum number of contiguous sequence… Read More »

## Final string after performing given operations

Given a string str containing only characters x and y, the task is to perform the following operations while possible: Find an index such that… Read More »

## Remove one bit from a binary number to get maximum value

Given a binary number, the task is to remove exactly one bit from it such that, after it’s removal, the resultant binary number is greatest… Read More »

## Minimum steps to convert one binary string to other only using negation

Given two binary strings A and B, the task is to convert A to B by choosing any sub-string of A and negating it (replace… Read More »

## Count of cyclic permutations having XOR with other binary string as 0

Given two binary strings and . Let be set of all the cyclic permutations of string . The task is to find how many strings… Read More »

## Minimum number of 1’s to be replaced in a binary array

Given a binary array arr[] of zero’s and one’s only. The task is to find the minimum number of one’s to be changed to zero… Read More »

## Minimum steps to remove substring 010 from a binary string

Given a binary string, the task is to count the minimum steps to remove substring “010” from this binary string. Examples: Input: binary_string = “0101010”… Read More »

## Check if it is possible to rearrange a binary string with alternate 0s and 1s

Given a binary string of length at-least two. We need to check if it is possible to rearrange a binary string such that there alternate… Read More »

## Divide binary array into three equal parts with same value

Given an array A of length n such that it contains only ‘0s’ and ‘1s’. The task is to divide the array into THREE different… Read More »

## Maximum Consecutive Zeroes in Concatenated Binary String

You are given a binary string str of length n. Suppose you create another string of size n * k by concatenating k copies of… Read More »

## Check whether a binary string can be formed by concatenating given N numbers sequentially

Given a sequence of ‘n’ numbers (without leading zeros), the task is to find whether it is possible to create a binary string by concatenating… Read More »

## Minimum swaps required to make a binary string alternating

You are given a binary string of even length and equal number of 0’s and 1’s. What is the minimum number of swaps to make… Read More »

## Arrange a binary string to get maximum value within a range of indices

Given a string consisting of only 0’s and 1’s. Now you are given N non-intersecting ranges L, R ( L <= R), more specifically [L1,… Read More »

## Minimum swaps required to convert one binary string to another

Given two binary string M and N of equal length, the task is to find a minimum number of operations (swaps) required to convert string… Read More »

## Lucky alive person in a circle | Set – 2

Given that N person (numbered 1 to N) standing as to form a circle. They all have the gun in their hand which is pointed… Read More »