会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Figure at a Window
管理
2022年8月29日
LeetCode04. Maximum Depth of Binary Tree
摘要: 题意 求一棵二叉树的深度 方法 DFS, 更新当前最大深度 代码 void dfs(TreeNode* root, int &height, int &ans) { if (root == nullptr) return; height++; dfs(root->left, height, ans)
阅读全文
posted @ 2022-08-29 20:01 Figure_at_a_Window
阅读(22)
评论(0)
推荐(0)