当前位置:网站首页>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 .
边栏推荐
- dried food! Generation of rare samples based on GaN
- Flink learning 7: application structure
- Programmers' telecommuting is mixed | community essay solicitation
- ctf-pikachu-CSRF
- PostgreSQL users cannot create table configurations by themselves
- Katalon使用script实现查询List大小
- C语言双向链表初版
- Katalon framework tests web (XXI) to obtain element attribute assertions
- 北漂程序员,月薪20K,一年攒15W,正常吗?
- (指针)编写函数void fun(int x,int *pp,int *n)
猜你喜欢
dried food! Generation of rare samples based on GaN
Flink学习7:应用程序结构
如何远程办公更有效率 | 社区征文
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
图解网络:什么是热备份路由器协议HSRP?
Rhcsa-- day one
Sales management system of lightweight enterprises based on PHP
Getting started with the go language is simple: go implements the Caesar password
PostgreSQL users cannot create table configurations by themselves
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
随机推荐
指针数组和数组指针
Restore the subtlety of window position
Pytest multi process / multi thread execution test case
C语言双向链表初版
'2'>' 10'==true? How does JS perform implicit type conversion?
【读书会第十三期】多媒体处理工具 FFmpeg 工具集
(指針)自己寫一個比較字符串大小的函數,功能與strcmp類似。
2021 RSC | Drug–target affinity prediction using graph neural network and contact maps
毕业三年,远程半年 | 社区征文
支持首次触发的 Go Ticker
[Yugong series] go teaching course 002 go language environment installation in July 2022
【微服务|openfeign】使用openfeign远程调用文件上传接口
程序员远程办公喜忧参半| 社区征文
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
postgresql 用户不能自己创建表格配置
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
leetcode刷题:二叉树09(二叉树的最小深度)
ctf-pikachu-CSRF
软件测试是干什么的 发现缺陷错误,提高软件的质量
JS realizes the effect of text scrolling marquee