摘要: 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 阅读全文
posted @ 2020-03-08 13:10 Sempron2800+ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-03-08 13:08 Sempron2800+ 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-03-08 03:31 Sempron2800+ 阅读(161) 评论(0) 推荐(0) 编辑