Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5a2b7b4

Browse files
Update 0235.二叉搜索树的最近公共祖先.md
补充B站视频链接
1 parent d610b11 commit 5a2b7b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎problems/0235.二叉搜索树的最近公共祖先.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
* 所有节点的值都是唯一的。
3636
* p、q 为不同节点且均存在于给定的二叉搜索树中。
3737

38-
# 思路
38+
# 算法公开课
39+
40+
**《代码随想录》算法视频公开课:[二叉搜索树找祖先就有点不一样了!| 235. 二叉搜索树的最近公共祖先](https://www.bilibili.com/video/BV1Zt4y1F7ww?share_source=copy_web),相信结合视频在看本篇题解,更有助于大家对本题的理解**
3941

42+
# 思路
4043

4144
做过[二叉树:公共祖先问题](https://programmercarl.com/0236.二叉树的最近公共祖先.html)题目的同学应该知道,利用回溯从底向上搜索,遇到一个节点的左子树里有p,右子树里有q,那么当前节点就是最近公共祖先。
4245

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /