当前位置:网站首页>2022.6.22-----leetcode. five hundred and thirteen
2022.6.22-----leetcode. five hundred and thirteen
2022-06-23 08:52:00 【Lu 727】
int maxh;// Maximum height
int ans;
public int findBottomLeftValue(TreeNode root) {
maxh=0;
ans=root.val;
dfs(root,0);
return ans;
}
// Depth-first search , Record the current height
void dfs(TreeNode n,int h){
if(n==null) return;
if(h>maxh){
maxh=h;
ans=n.val;
}
dfs(n.left,h+1);
dfs(n.right,h+1);
}边栏推荐
- Android kotlin coroutines KTX extension
- 986. Interval List Intersections
- 173. Binary Search Tree Iterator
- 测试-- 自动化测试selenium(关于API)
- Flink错误--Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered “time“
- [qnx hypervisor 2.2 user manual]6.2 network
- 6-shining laser application of calayer
- Leetcode topic analysis count primes
- usb peripheral 驱动 - debug
- 1、 Software architecture evaluation
猜你喜欢

Linux MySQL installation

'教练,我想打篮球!' —— 给做系统的同学们准备的 AI 学习系列小册

最常用的5中流ETL模式

Keng dad's "dedication blessing": red packet technology explosion in Alipay Spring Festival Gala

297. Serialize and Deserialize Binary Tree

Testing -- automated testing selenium (about API)

986. Interval List Intersections

In June, China database industry analysis report was released! Smart wind, train storage and regeneration
![Paper reading [quovadis, action recognition? A new model and the dynamics dataset]](/img/3f/449cc91bfa66fcf26bc2cd405fb773.png)
Paper reading [quovadis, action recognition? A new model and the dynamics dataset]

The first day of employment more than ten years ago
随机推荐
4、 Database design
You have a string of code, but do not support the lower version of go; Judge the go version number, you deserve it!
Derivation and loading of the trained random forest model
125. Valid Palindrome
点击添加下拉框
Interpretation of the most dirty technology in history, I can understand 60 it terms in seconds
GeoServer adding mongodb data source
How to use the template library of barcode label software
Open source stealing malware mercurial found in the field for "educational purposes"
[operating steps] how to set the easynvr hardware device to be powered on without automatic startup?
论文阅读【Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset】
Le rapport d'analyse de l'industrie chinoise des bases de données a été publié en juin. Le vent intelligent se lève, les colonnes se régénèrent
'教练,我想打篮球!' —— 给做系统的同学们准备的 AI 学习系列小册
[QNX Hypervisor 2.2用户手册]6.1 使用QNX Hypervisor系统
Deep analysis and Simulation of vector
Unique paths for leetcode topic resolution
[qnx hypervisor 2.2 user manual]6.1 using the QNX hypervisor system
125. Valid Palindrome
Self organizing map neural network (SOM)
986. Interval List Intersections