Available question text
Find the longest contiguous substring of the form 0^k1^k (k zeroes immediately followed by k ones) — i.e., zeros before ones and equal counts — and return its length. This is equivalent to scanning adjacent runs of zeros and ones and taking the maximum 2*min(length of a zero-run, the following one-run).
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
No company association
Leetcode 2609. Find the Longest Balanced Substring of a Binary String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source