摘要: 1 class Solution: 2 def balancedStringSplit(self, s: str) -> int: 3 count,res = 0,0 4 for si in s: 5 if si == 'L': 6 count += 1 7 else: 8 count -= 1 9 if count == 0: 10 res += 1 11 return res 阅读全文
posted @ 2019-10-15 08:11 Sempron2800+ 阅读(218) 评论(0) 推荐(0) 编辑