摘要:
1 class Solution: 2 def numTimesAllBlue(self, light: 'List[int]') -> int: 3 right,res = 0,0 4 for i, a in enumerate(light, start=1): 5 right = max(rig 阅读全文
摘要:
1 class Solution: 2 def generateTheString(self, n: int) -> str: 3 if n == 1: 4 return 'a' 5 elif n == '2': 6 return 'ab' 7 else: 8 if n % 2 == 0: 9 re 阅读全文
摘要:
1 class Solution: 2 def sortString(self, s: str) -> str: 3 n = len(s) 4 dic = {} 5 for i in range(n): 6 if s[i] not in dic: 7 dic[s[i]] = 1 8 else: 9 阅读全文