master
ehlxr 2022-06-20 10:13:43 +08:00
parent 23be3094f9
commit e754ded095
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ func find(root *TreeNode, l, r int) *TreeNode {
if root == nil {
return nil
}
// p 和 q 均存在于给定的二叉树中
if root.Val == l || root.Val == r {
return root
}