leetcode427】的更多相关文章

本题不会做,从网上找到了python3的解法,记录如下. class Solution: def construct(self, grid): def dfs(x, y, l): if l == 1: node = Node(grid[x][y] == 1, True, None, None, None, None) else: tLeft = dfs(x, y, l // 2) tRight = dfs(x, y + l // 2, l // 2) bLeft = dfs(x + l // 2…