## Occurrences of a pattern in binary representation of a number

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

- Maximum contiguous 1 possible in a binary string after k rotations
- Number of Binary Strings of length N with K adjacent Set Bits
- Divide binary array into three equal parts with same value
- Check if a binary string has two consecutive occurrences of one everywhere
- Minimum number of 1's to be replaced in a binary array
- Minimum swaps required to convert one binary string to another
- Recursive Program for Binary to Decimal
- Minimum number of operations required to sum to binary string S
- Occurrences of a pattern in binary representation of a number
- Minimum swaps required to make a binary string alternating
- Length of longest consecutive ones by at most one swap in a Binary String
- Number of steps required to convert a binary number to one
- Minimum number of given operations required to convert a string to another string
- 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)
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"
- Count of cyclic permutations having XOR with other binary string as 0
- Check if a binary string contains consecutive same or not
- Bitwise AND of N binary strings
- Generate all the binary strings of N bits
- Ways to divide a binary array into sub-arrays such that each sub-array contains exactly one 1
- Number of unique permutations starting with 1 of a Binary String
- Minimum steps to remove substring 010 from a binary string
- Lucky alive person in a circle | Set - 2
- Check if it is possible to rearrange a binary string with alternate 0s and 1s
- 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
- Minimum number of moves to make a binary array K periodic
- Find the n-th binary string in sorted order
- Find Bit whose minimum sequence flips makes all bits same

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

Given a binary number as string, find its decimal equivalent. Examples: Input : binary = “101” Output : 5 Input : binary = “1111” Output… Read More »

Given a binary string S. Find the minimum number of operations required to be performed on the number zero to convert it to the number… Read More »

Given a binary array, where 1 denotes push operation and 0 denotes a pop operation in a stack or queue. The task is to check… Read More »

Given and . The task is to find the number of binary strings of length n out of 2n such that they satisfy f(bit string)… Read More »

Given three integers A, B and X. The task is to construct a binary string str which has exactly A number of 0’s and B… Read More »

Given a string str, the task is to check whether every group of consecutive a’s is followed by a group of consecutive b’s of same… Read More »

Given a Binary String of length . It is allowed to do at most one swap between any 0 and 1. The task is to… Read More »

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 »

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 »

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 »

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 »

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 »

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 »

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 »