Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Algorithms
1.9k+ articles
Dynamic Programming
1.5k+ articles
Bit Magic
1.2k+ articles
substring
340+ articles
binary-string
370+ posts
Popular Articles
Recent Articles
What is Binary String?
Last Updated: 27 November 2023
A binary string is a string that only has two characters, usually the numbers 0 and 1, and it represents a series of binary digits.Binary St
...read more
Strings
binary-string
Picked
DSA
Definitions and Meanings
Largest Prime Number possible from a subsequence of a Binary String
Last Updated: 01 February 2023
Given a Binary string, the task is to find the largest Prime Number possible by the decimal representation of a subsequence of the given bin
...read more
Strings
Bit Magic
Algorithms
Mathematical
subsequence
binary-string
binary-representation
Prime Number
Data Structures
DSA
Program to construct DFA accepting odd number of 0s and odd number of 1s
Last Updated: 07 June 2021
Given a binary string S, the task is to write a program for DFA Machine that accepts a string with odd numbers of 0s and 1s.Examples:Input:
...read more
Strings
binary-string
CS - Placements
Theory of Computation
DFA
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Algorithms
1.9k+ articles
Dynamic Programming
1.5k+ articles
Bit Magic
1.2k+ articles
substring
340+ articles
Minimum flips required to form given binary string where every flip changes all bits to its right as well
Last Updated: 13 February 2022
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 every
...read more
Strings
Bit Magic
Algorithms
Dynamic Programming
binary-string
DSA
Sort 1 to N by swapping adjacent elements
Last Updated: 28 April 2025
Given an array arr[] of size n containing a permutation of the integers from 1 to n, and a binary array brr[] of size n − 1 in which you c
...read more
Arrays
Sorting
binary-string
DSA
Longest subsegment of '1's formed by changing at most k '0's
Last Updated: 25 April 2023
Given a binary array a[] and a number k, we need to find length of the longest subsegment of '1's possible by changing at most k '0's.Exampl
...read more
Arrays
binary-string
DSA
Maximum difference of zeros and ones in binary string
Last Updated: 06 July 2023
Given a binary string of 0s and 1s. The task is to find the length of the substring which is having a maximum difference between the number
...read more
Strings
Dynamic Programming
binary-string
Kadane
DSA
Count of substrings of a binary string containing K ones
Last Updated: 20 July 2022
Given a binary string of length N and an integer K, we need to find out how many substrings of this string are exist which contains exactly
...read more
Misc
Strings
Hash
binary-string
prefix-sum
DSA
Sort a binary array using one traversal and no extra space
Last Updated: 26 April 2024
Given a binary array, sort it using one traversal and no extra spaceExamples:Input: 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 1 1 0 1 0 0Output: 0 0 0 0
...read more
Sorting
binary-string
DSA
Find the index of first 1 in a sorted array of 0's and 1's
Last Updated: 03 October 2022
Given a sorted array consisting 0's and 1's. The problem is to find the index of first '1' in the sorted array. It could be possible that th
...read more
Arrays
Amazon
MakeMyTrip
Binary Search
binary-string
DSA
Count minimum right flips to set all values in an array
Last Updated: 01 November 2022
N light bulbs are connected by a wire. Each bulb has a switch associated with it, however due to faulty wiring, a switch also changes the st
...read more
Arrays
binary-string
DSA
Check if a string follows a^nb^n pattern or not
Last Updated: 11 July 2022
Given string str, return true string follows pattern anbn, i.e., it has a's followed by b's such that the number of a's and b's are same.Exa
...read more
Strings
binary-string
DSA
Count strings with consecutive 1's
Last Updated: 20 July 2024
Given a number n, count number of n length strings with consecutive 1's in them.Examples:Input : n = 2Output : 1There are 4 strings of leng
...read more
Bit Magic
Amazon
binary-string
DSA
Longest Span with same Sum in two Binary arrays
Last Updated: 10 October 2024
Given two binary arrays, a[] and b[] of the same size n. Find the length of the longest common span (i, j) where j = i such that a[i] + a[i+
...read more
Arrays
binary-string
prefix-sum
cpp-unordered_map
DSA
Add two bit strings
Last Updated: 26 April 2025
Given two binary stringss1ands2consisting of only 0s and 1s. Find the resultant string after adding the two Binary Strings.Note:The input st
...read more
Bit Magic
binary-string
binary-representation
Bitwise-XOR
DSA
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !