-
Notifications
You must be signed in to change notification settings - Fork 645
字节一面:给定一个二叉树, 找到该树中两个指定节点间的最短距离 #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
先找出两个节点的最近公共祖先 求公共祖先
计算距离
|
解答:求最近公共祖先节点,然后再求最近公共祖先节点到两个指定节点的路径,再求两个节点的路径之和
|
|
|
我的字节一面也是这个题 |
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The text was updated successfully, but these errors were encountered: