摘要: 思路分析:将字符串的"{}"内的部分和常规字符分开处理。对于大括号内的部分,先将括号内的字符进行“组合”,然后再把常规字符插入到相应的位置。 本题的主要思想和leetcode17: Letter Combinations of a Phone Number是一样的。 阅读全文
posted @ 2019-06-15 23:56 Sempron2800+ 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def highFive(self, items: List[List[int]]) -> List[List[int]]: 3 n = len(items) 4 dic = {} 5 for item in items: 6 ids = item[0] 7 ... 阅读全文
posted @ 2019-06-15 23:55 Sempron2800+ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def sumOfDigits(self, A: List[int]) -> int: 3 n = len(A) 4 if n == 0: 5 return 1 6 minnum = min(A) 7 strnum = str(minnum) 8... 阅读全文
posted @ 2019-06-15 23:54 Sempron2800+ 阅读(144) 评论(0) 推荐(0) 编辑