Available question text
Given a binary string s, perform at most one swap between any two characters, then select a substring with an equal number of '0's and '1's. Return the maximum length of such a balanced substring.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
LinkedIn
Longest Balanced Substring With One Swap
Reported May 4, 2026 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source