当前位置:网站首页>Leetcode skimming: binary tree 07 (maximum depth of binary tree)
Leetcode skimming: binary tree 07 (maximum depth of binary tree)
2022-07-04 04:20:00 【Taotao can't learn English】
104. The maximum depth of a binary tree
Given a binary tree , Find out the maximum depth .
The depth of a binary tree is the number of nodes in the longest path from the root node to the farthest leaf node .
explain : A leaf node is a node that has no children .
Example :
Given binary tree [3,9,20,null,null,15,7],
Return to its maximum depth 3 .
I was stuck for a long time at first , Later it was the same , You can use hierarchical traversal to do , After each floor , Maximum depth + 1 that will do .
边栏推荐
- PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?
- Idea modify body color
- Select sorting and bubble sorting template
- idea修改主体颜色
- leetcode刷题:二叉树09(二叉树的最小深度)
- 北漂程序员,月薪20K,一年攒15W,正常吗?
- LNK2038 检测到“RuntimeLibrary”的不匹配项: 值“MD_DynamicRelease”不匹配值“MDd_DynamicDebug”(main.obj 中)
- 图解网络:什么是热备份路由器协议HSRP?
- 02 specific implementation of LS command
- leetcode刷题:二叉树05(翻转二叉树)
猜你喜欢
Rhcsa-- day one
The maximum expiration time of client secret in azure ad application registration is modified to 2 years
Unity移动端游戏性能优化简谱之 画面表现与GPU压力的权衡
Sales management system of lightweight enterprises based on PHP
干货!基于GAN的稀有样本生成
Exercises in quantum mechanics
Pointer array and array pointer
Flink学习6:编程模型
Katalon framework test web (XXVI) automatic email
Perf simple process for multithreaded profile
随机推荐
三年进账35.31亿,这个江西老表要IPO了
Three years of graduation, half a year of distance | community essay solicitation
"Implement both software and hardware" to help build a new cloud computing data center
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
Parameterization of controls in katalon
mysql数据库的存储
The difference between bagging and boosting in machine learning
Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
Graduation summary
I Build a simple microservice project
Global exposure and roller shutter exposure of industrial cameras
SDP中的SPA
【罗技】m720
RHCSA 07 - 用户与群组管理
Katalon framework tests web (XXI) to obtain element attribute assertions
Spa in SDP
leetcode刷题:二叉树06(对称二叉树)
RHCSA 06 - suid, sgid, sticky bit(待补充)
如何有效远程办公之我见 | 社区征文
[webrtc] M98 Ninja build and compile instructions