## Count binary strings with twice zeros in first half

We are given an integer N. We need to count the total number of such binary strings of length N such that the number of… 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
- 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
- Arrange a binary string to get maximum value within a range of indices

We are given an integer N. We need to count the total number of such binary strings of length N such that the number of… Read More »

There are n student groups at the school. On each day in school, there are m time slots. A student group may or may not… Read More »

Given a binary string and a number k, task is to check whether the binary string is evenly divisible by 2k or not. Examples :… Read More »

Dragon Curve Sequence is an infinite binary sequence of 0s and 1s. The first term of the sequence is 1. From the next term, we… Read More »

Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is an infinite binary sequence of 0s and 1s. The sequence is obtained by starting with 0 and successively appending… Read More »

Given n and k, Construct a palindrome of size n using a binary number of size k repeating itself to wrap into the palindrome. The… Read More »

Given a binary array, task is to sort this binary array using minimum swaps. We are allowed to swap only adjacent elements Examples: Input :… Read More »

Given a string of character the task is to convert each character of a string into the equivalent binary number. Examples : Input : GFG… Read More »

Given an array A of size N consisting of elements 1 to N. A boolean array B consisting of N-1 elements indicates that if B[i]… Read More »

Given a decimal number m, convert it into a binary string and apply n iterations, in each iteration 0 becomes “01” and 1 becomes “10”.… Read More »

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

Given a binary string of size N. Count all substring that have even decimal value considering binary to decimal conversion from left to right (For… Read More »

Given K and a binary number, check if there exists k consecutive 1’s in the binary number. Examples: Input : binary number = 101010101111 k… Read More »

Given a binary string containing only 0’s and 1’s. Write a program to find number of sub-strings of this string whose decimal representation is odd.… Read More »

Given an array arr[] of size n containing 0 and 1 only. The problem is to count the subarrays having equal number of 0’s and… Read More »