摘要: 题目描述: 方法一:O(N) class Solution: def findNumbers(self, nums: List[int]) -> int: ans=0 for num in nums: if len(str(num))%2==0: ans+=1 return ans 方法二:数学 O 阅读全文
posted @ 2019-12-25 19:13 oldby 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 自己的提交: class Solution: def isPossibleDivide(self, nums: List[int], k: int) -> bool: c = collections.Counter(nums) n = len(nums) m = n/k if m%1 ! 阅读全文
posted @ 2019-12-25 19:04 oldby 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 自己的提交: class Solution: def maxFreq(self, s: str, maxLetters: int, minSize: int, maxSize: int) -> int: c = collections.Counter() for i in range(l 阅读全文
posted @ 2019-12-25 17:25 oldby 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 方法一:bfs class Solution: def maxCandies(self, status: List[int], candies: List[int], keys: List[List[int]], containedBoxes: List[List[int]], init 阅读全文
posted @ 2019-12-25 17:11 oldby 阅读(141) 评论(0) 推荐(0) 编辑