Balanced strings are those that have an equal quantity of 'L'
and 'R'
characters.
Given a balanced string s
, split it in the maximum amount of balanced strings.
Return the maximum amount of split balanced strings.
------------------------------------------
Constraints:
1 <= s.length <= 1000
s[i]
is either 'L'
or 'R'
.s
is a balanced string.'L'
and 'R'
charactersRLRRLLRLRL
4
Explanation for example:
Hint:
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
沒有發現任何「解題報告」 |