当前位置:网站首页>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 .

边栏推荐
- Huawei cloud Kunpeng engineer training (Guangxi University)
- [book club issue 13] multimedia processing tool ffmpeg tool set
- How to add custom API objects in kubernetes (1)
- Illustrated network: what is the hot backup router protocol HSRP?
- My opinion on how to effectively telecommute | community essay solicitation
- leetcode刷题:二叉树04(二叉树的层序遍历)
- Flink learning 8: data consistency
- Go 语言入门很简单:Go 实现凯撒密码
- ROS2中CMake编译选项的设置
- CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
猜你喜欢

量子力学习题

There is a problem that the package cannot be parsed in the like project

postgresql 用户不能自己创建表格配置
TCP-三次握手和四次挥手简单理解

Confession code collection, who says program apes don't understand romance

dried food! Generation of rare samples based on GaN
![[paddleseg source code reading] paddleseg custom data class](/img/88/37c535b371486db545abc392a685af.png)
[paddleseg source code reading] paddleseg custom data class

10 reasons for not choosing to use free virtual hosts

02 ls 命令的具体实现

Two commonly used graphics can easily realize data display
随机推荐
hbuildx中夜神模拟器的配置以及热更新
SDP中的SPA
02 ls 命令的具体实现
LevelDB源码解读-SkipList
TCP-三次握手和四次挥手简单理解
Mitsubishi M70 macro variable reading Mitsubishi M80 public variable acquisition Mitsubishi CNC variable reading acquisition Mitsubishi CNC remote tool compensation Mitsubishi machine tool online tool
Distributed system: what, why, how
01 QEMU starts the compiled image vfs: unable to mount root FS on unknown block (0,0)
程序员远程办公喜忧参半| 社区征文
Confession code collection, who says program apes don't understand romance
Redis cluster view the slots of each node
Three years of graduation, half a year of distance | community essay solicitation
DP83848+网线热拔插
Idea configuration 360zip open by default -- external tools
ctf-pikachu-XSS
指针数组和数组指针
Parameterization of controls in katalon
【CSRF-01】跨站请求伪造漏洞基础原理及攻防
Tcpclientdemo for TCP protocol interaction
支持首次触发的 Go Ticker