会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
約束の空
博客园
首页
新随笔
联系
订阅
管理
2019年7月17日
LeetCode 865. Smallest Subtree with all the Deepest Nodes
摘要: 树的题递归来做。给定一个root,如果左右两颗子树height一样,那么root就是所求的解;如果不一样,那么解一定再height高的那棵子树里,递归调用即可。height和depth的区别:What is the difference between tree depth and height?
阅读全文
posted @ 2019-07-17 14:25 約束の空
阅读(120)
评论(0)
推荐(0)
公告