摘要: 1 class Solution: 2 def __init__(self): 3 self.result = 0 4 5 def preOrder(self,root): 6 if root != None: 7 if root.val % 2 == 0: 8 self.levelOrder(ro 阅读全文
posted @ 2020-01-11 23:59 Sempron2800+ 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def matrixBlockSum(self, mat: 'List[List[int]]', K: int) -> 'List[List[int]]': 3 r,c = len(mat),len(mat[0]) 4 prefixsum = [[0 for 阅读全文
posted @ 2020-01-11 23:57 Sempron2800+ 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def decompressRLElist(self, nums: 'List[int]') -> 'List[int]': 3 n = len(nums) 4 i = 0 5 res = [] 6 while i < n: 7 a = nums[i] 8 b 阅读全文
posted @ 2020-01-11 23:55 Sempron2800+ 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution: 2 def xorQueries(self, arr: 'List[int]', queries: 'List[List[int]]') -> 'List[int]': 3 n = len(arr) 4 prefixsum = [arr[0]] * n 5 res 阅读全文
posted @ 2020-01-11 19:13 Sempron2800+ 阅读(179) 评论(0) 推荐(0) 编辑