Skip to content

Tag Archives: binary-string

Given a binary string S having N characters and two integers K and Q, the task is to find the minimum number of remaining zeroes… Read More
Given a binary string S, the task is to find the sum of the shortest distance between all 0s to 1 in the given string… Read More
Given a binary string S of size N, the task is to check if the count of 1s can be made greater than the count… Read More
Given a positive integer N and an array arr[] consisting of K integers and consider a binary string(say S) having N set bits, the task… Read More
Given three positive integers A, B, and K, the task is to find the Kth lexicographically smallest binary string that contains exactly A number of… Read More
Given an array arr[] of N distinct binary strings each having N characters, the task is to find any binary string having N characters such… Read More
Given a binary string S of size N and an integer K, the task is to find the minimum number of operations required to make… Read More
Given a binary string S(1-based indexing) of size N, and two positive integers K1 and K2, the task is to find the lexicographically smallest string… Read More
Given a positive integer N and an array arr[] of size K consisting of binary string where each string is of size N, the task… Read More
Given a binary string S consisting of N characters, the task is to find the minimum number of flips required such that there don’t exist… Read More
Given a binary string S of size (N – 1), the task is to find the lexicographically smallest permutation P of the first N natural… Read More
Given a string S consisting of only ‘0’, ‘1’ and ‘?’, the task is to check if there exists a substring “10” in every possible… Read More
Given a binary string S of size N, the task is to find the minimum cost by swapping every set bit with an unset bit… Read More
Given a binary string S, the task is to find the minimum number of characters the needed to be flipped to make the given binary… Read More
Given a binary string, the task is to print the length of the longest substring containing only ‘1’. Examples: Input: 110Output: 2Explanation: Length of the… Read More