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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.