当前位置:网站首页>剑指 Offer 55 - I. 二叉树的深度
剑指 Offer 55 - I. 二叉树的深度
2022-07-16 18:25:00 【anieoo】
solution:
dfs
class Solution {
public:
int maxDepth(TreeNode* root) {
if(root == NULL) return 0;
int left = maxDepth(root->left);
int right = maxDepth(root->right);
return max(left, right) + 1;
}
};边栏推荐
- scrcpy投屏
- 基于 Servlet 项目——博客系统
- Taote keyword search commodity API interface (commodity list interface, sales volume sorting interface, commodity sales volume interface)
- sentinel
- 千万级别数据mysql distinct group by
- 动态内存管理(c语言)
- Redis cluster
- Development of power module based on stm32
- SF city test development side 49min answer
- 小姐姐我来啦
猜你喜欢

21. How does the program execute after entering the URL in the browser?

顺丰同城测试开发一面 49min答案

Opencv tutorial 02: core operations of opencv
![[Xuelang download tutorial] 01 configuration of fiddler for Xuelang Download](/img/0b/f2ccff1084385df29757d03e3cabec.png)
[Xuelang download tutorial] 01 configuration of fiddler for Xuelang Download
![[untitled]](/img/36/fb28ed9218edd1daeb5757653a8655.png)
[untitled]

Tableau JDBC connection graphdb

SkyWalking 针对 gRPC 的负载均衡和自动扩容实践

What skills do software test engineers need to master if they need to speak 20K? I dare to be higher with these skills~

高数下|二重积分的概念及性质|高数叔|手写笔记

开口就要20k的软件测试工程师需要掌握哪些技能?有这些技能我敢要更高~
随机推荐
Solve the hikaricp problem of database connection pool
Pending issues
Test management knowledge: how to transform from a business expert to a grass-roots Manager
How to do fine operation management in industrial parks
Dynamic memory management (C language)
Multipartfile to Base64
User defined type explanation (C language)
How to use Fiddler to capture a Qiyi applet video download
1. Solve com mysql. jdbc. PacketTooBigException: Packet for query is too large
Scrcpy projection
docker mysql
[Xuelang download tutorial] 06 Xuelang simulated web version login, without client and global agent software
小程序页面导航
Equity structure design of start-up companies (cases)
Redis-Cluster集群、
Unity-2d pixel lattice ablation
Splunk configuring multi cluster index
【云原生】DevOps(四):集成Sonar Qube
Go's command line Library -- Cobra uses
Electron安装配置