标签:res pre lan bsp col def color ret elf
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
标签:res pre lan bsp col def color ret elf
原文地址:https://www.cnblogs.com/asenyang/p/11675262.html