摘要:
题目描述; 自己的提交:超时 class Solution: def maxSideLength(self, mat: List[List[int]], threshold: int) -> int: m,n = len(mat),len(mat[0]) res = 0 for i in range 阅读全文
摘要:
题目描述: 自己的提交:广度优先 O(mn*min(k,m+n)) class Solution: def shortestPath(self, grid, k: int) -> int: visited = {} queue = [[0,0,k-1]]if grid[0][0] == 1 and 阅读全文