摘要: from typing import List# 这道题看了大佬写的代码,经过自己的理解写出来了。# 从最外围的四周找有没有为O的,如果有的话就进入深搜函数,然后深搜遍历# 判断上下左右的位置是否为Oclass Solution: def solve(self, board: List[List[s 阅读全文
posted @ 2020-07-29 19:49 月为暮 阅读(223) 评论(0) 推荐(0) 编辑
摘要: class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = Nonea = TreeNode(1)b = TreeNode(2)c = TreeNode(3)a.left = ba.right = 阅读全文
posted @ 2020-07-29 18:44 月为暮 阅读(210) 评论(0) 推荐(0) 编辑