day10笔记 1.题目描述2.代码构思(debug)3.树类题目总结 1.题目描述 2.代码构思(debug) class Solution: def isSameTree(self, p: TreeNode, q: TreeNode) -> bool: if not p and not q: return True if not q or not p: return False Flag = p.val == q.val and self.isSameTree(p.left,q.left) and self.isSameTree(p.right,q.right) return Flag 3.树类题目总结