摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文