摘要:
1 class Solution: 2 def dfs(self,grid,visited,x,y,m,n): 3 if x < 0 or x >= m or y < 0 or y >= n or visited[x][y] == 1: 4 return False 5 if x == m - 1 阅读全文
摘要:
1 class Solution: 2 def sumFourDivisors(self, nums: 'List[int]') -> int: 3 result = 0 4 n = len(nums) 5 for i in range(n): 6 s = set() 7 cur = nums[i] 阅读全文
摘要:
1 class Solution: 2 def createTargetArray(self, nums: List[int], index: List[int]) -> List[int]: 3 n = len(nums) 4 result = [] 5 for i in range(n): 6 阅读全文
摘要:
1 class Solution: 2 def findTheDistanceValue(self, arr1: List[int], arr2: List[int], d: int) -> int: 3 n1,n2 = len(arr1),len(arr2) 4 result = 0 5 for 阅读全文