Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1221. Split a String in Balanced Strings
Given a balanced string of 'L' and 'R', partition it into the maximum number of contiguous substrings each having an equal number of L and R. This reduces to scanning the string and counting segments where the running difference between counts of L and R returns to zero.
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.