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

边栏推荐
- Reduce function under functools
- Illustrated network: what is the hot backup router protocol HSRP?
- Introduction to asynchronous task capability of function calculation - task trigger de duplication
- [csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability
- 01 qemu 启动编译好的镜像 VFS: Unable to mount root fs on unknown-block(0,0)
- [book club issue 13] multimedia processing tool ffmpeg tool set
- ctf-pikachu-XSS
- Graduation project: design seckill e-commerce system
- 疫情来袭--远程办公之思考|社区征文
- 软件测试是干什么的 发现缺陷错误,提高软件的质量
猜你喜欢

透过JVM-SANDBOX源码,了解字节码增强技术原理
![[Logitech] m720](/img/bb/44144a1c3907808398c05b3b36962c.png)
[Logitech] m720

PPt 教程,如何在 PowerPoint 中将演示文稿另存为 PDF 文件?

Exercises in quantum mechanics

I Build a simple microservice project

量子力学习题

2021 RSC | Drug–target affinity prediction using graph neural network and contact maps

ctf-pikachu-CSRF
![[csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability](/img/46/cb5a10ffe3fcdffb7da68dbaef5b1f.png)
[csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability

Introduction to asynchronous task capability of function calculation - task trigger de duplication
随机推荐
Epidemic strikes -- Thinking about telecommuting | community essay solicitation
LevelDB源码解读-SkipList
Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
Penetration practice - sqlserver empowerment
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
软件测试是干什么的 发现缺陷错误,提高软件的质量
支持首次触发的 Go Ticker
PostgreSQL users cannot create table configurations by themselves
(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
laravel admin里百度编辑器自定义路径和文件名
How to telecommute more efficiently | community essay solicitation
Restore the subtlety of window position
指针数组和数组指针
leetcode刷题:二叉树07(二叉树的最大深度)
vim正确加区间注释
Go 语言入门很简单:Go 实现凯撒密码
Katalon使用script实现查询List大小
Unity 绘制弹球和台球的运动轨迹
Flink learning 7: application structure
dried food! Generation of rare samples based on GaN