摘要: 题目描述: 方法一:排序 O(nlogn) class Solution: def isAnagram(self, s: str, t: str) -> bool: return sorted(s)==sorted(t) 方法二:哈希表 O(N) O(1) class Solution: def i 阅读全文
posted @ 2019-10-08 10:25 oldby 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 方法:分治* class Solution: def diffWaysToCompute(self, input: str) -> List[int]: if input.isdigit(): return [int(input)] tem = [] for k in range(len 阅读全文
posted @ 2019-10-08 10:08 oldby 阅读(204) 评论(0) 推荐(0) 编辑