## Count of binary strings of given length consisting of at least one 1

Given an integer N, the task is to print the number of binary strings of length N which at least one ‘1’. Examples: Input: 2… Read More »

- Count number of binary strings without consecutive 1’s : Set 2
- Bitwise XOR of a Binary array
- Maximum number of set bits count in a K-size substring of a Binary String
- Count of Binary strings of length N having atmost M consecutive 1s or 0s alternatively exactly K times
- Maximize count of 0s in left and 1s in right substring by splitting given Binary string
- Minimum Group Flips to Make Binary Array Elements Same
- Minimum number of swaps to make two binary string equal
- Minimum flips required to keep all 1s together in a Binary string
- Count of distinct XORs formed by rearranging two Binary strings
- Program to print modified Binary triangle pattern
- Maximum splits in binary string such that each substring is divisible by given odd number
- String obtained by reversing and complementing a Binary string K times
- Minimum bit flips such that every K consecutive bits contain at least one set bit
- Periodic Binary String With Minimum Period and a Given Binary String as Subsequence.
- Minimum elements to be removed to make count of 0s and 1s equal
- Longest subsequence possible that starts and ends with 1 and filled with 0 in the middle
- Find minimum number of steps to reach the end of String
- Split a binary string into K subsets minimizing sum of products of occurrences of 0 and 1
- Build a DFA to accept Binary strings that starts or ends with "01"
- Minimum flips required to generate continuous substrings of 0’s and 1’s
- Binary string with given frequencies of sums of consecutive pairs of characters
- Maximize the decimal equivalent by flipping only a contiguous set of 0s
- Check if all bits can be made same by flipping two consecutive bits
- Minimum flips required to form given binary string where every flip changes all bits to its right as well
- Count of 1-bit and 2-bit characters in the given binary string
- Count of sub-strings with equal consecutive 0's and 1's
- Number of binary strings such that there is no substring of length ≥ 3
- Longest sub-sequence of a binary string divisible by 3
- Generate string with Hamming Distance as half of the hamming distance between strings A and B
- Maximize the number of palindromic Strings

Given an integer N, the task is to print the number of binary strings of length N which at least one ‘1’. Examples: Input: 2… Read More »

Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s… Read More »

Given a binary string str of size N and a positive integer K, the task is to find the minimum number of flips required to… Read More »

Given a binary string str, the task is to build a DFA that accepts given binary string if it contains “01” i times and “1”… Read More »

Given a binary string S, the task is to count the minimum number of jumps required to group all 1’s together. Examples: Input: S =… Read More »

Given a string S, the task is to find minimum flips required to convert an initial binary string consisting of only zeroes to S where… Read More »

Given a binary string S, and an integer K, the task is to find the minimum number of flips required such that every substring of… Read More »

Given a binary string str, the task is to build a DFA that accepts the string if the string either starts with “01” or ends… Read More »

Given a binary string S of size N and an integer K. The task is to find the maximum number of set bit appears in… Read More »

Given a binary string s, the task is to find the length of longest subsequence that can be divided into three substrings such that the… Read More »

Given a binary string S of length N, the task is to find the minimum number of bit flips required to convert the given string… Read More »

Given a binary array, we need to convert this array into an array that either contains all 1s or all 0s. We need to do… Read More »

Given a binary string S, the task is to partition the sequence into K non-empty subsets such that the sum of products of occurences of… Read More »

Given three integers P, Q, and R, the task is to generate a binary string with P, Q and R pairs of consecutive characters with… Read More »

Given a binary string str, the task is to find the minimum number of flips required to keep all 1s together in the given binary… Read More »