Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2609. Find the Longest Balanced Substring of a Binary String
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.