E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
maxdepth
JNPF java版本3.4.1旗舰版 /微服务、单体 、JAVA 和.net6版本框架
[DisassemblyDiagnoser(
maxDepth
:1)]//changeto0forjustthe[Benchmark]metho
「已注销」
·
2024-08-30 18:45
java
.net
开发语言
低代码
微服务
代码随想录算法训练营第18天|● 513.找树左下角的值● 112. 路径总和 113.路径总和ii● 106.从中序与后序遍历序列构造二叉树 105.从前序与中序遍历序列构造二叉树
用一个全局变量
MaxDepth
记录最大的深度,depth记录当前遍历的层数(所以需要回溯过程)。
strive340
·
2024-02-20 18:08
算法
数据结构
linux 08 文件查找
find:find路径选项文件名(文件名记不全可用代替,如hos就会查找以hos字样的文件)选项:-name:按照文件名区分大小写-iname:不区分大小写-size:按文件大小查找(如后接+5M)-
maxdepth
万zp
·
2024-02-13 01:23
运维
运维
jenkins部署docker容器化服务Kuernetes版ACK使用(提供部署源码)
-
maxdepth
1-name"*.jar")DOCKERFILE_NOPATH=$(find.
中年程序员一枚
·
2024-02-12 05:02
环境搭建专栏
jenkins
docker
运维
【leetcode】104. 二叉树的最大深度
二叉树的最大深度intmaxDepth(structTreeNode*root){if(root==NULL){return0;}//选出左子树和右子树中较高的树+根节点本身高度returnfmax(
maxDepth
念来过倒字名qwq
·
2024-02-09 21:15
Data
Structure
and
Algorithm
C语言
刷题
leetcode
算法
数据结构
c语言
513. 找树左下角的值 - 力扣(LeetCode)
在深度优先搜索时,我们先搜索当前节点的左子节点,再搜索当前节点的右子节点,然后判断当前节点的深度depth是否大于
maxDepth
,如果是,那
maybe_za
·
2024-02-09 21:09
leetcode
算法
二叉树
广度优先搜索
深度优先搜索
动态算法(基础九)笔记回顾
root){return0;//到根节点就返回}else{//递归一次,就会使得栈的计数加一constleft=
maxDepth
(root.left);//递归左子树constright=
Penguin Zero
·
2024-02-02 10:04
笔记
Linux 如何快速知道当前目录下面有多少文件
-
maxdepth
1-typef|wc-l//限制搜索目录深度层级为1,并统计
何浩钧
·
2024-02-01 10:07
linux
运维
服务器
linux查询文件夹及文件数目
/uploud_from_machine/formal_dom/18-
maxdepth
1-typed|wc-l)-12.查询文件夹下的文件数目要统计目录中的所有项(文件和子目录),但不包括目录本身,可以使用以下命令
@王坤
·
2024-01-31 17:46
linux
linux
运维
服务器
代码随想录算法训练营day16 | 104.二叉树的最大深度、111.二叉树的最小深度、222.完全二叉树的节点个数
二叉树的最大深度递归法,后序遍历classSolution:defmaxDepth(self,root:Optional[TreeNode])->int:ifnotroot:return0left_depth=self.
maxDepth
sunflowers11
·
2024-01-31 14:18
算法
数据结构
LeetCode 第十六天
-100left);intright=
maxDepth
(root->right);return1+
星仔007
·
2024-01-29 14:06
leetcode
java
算法
代码随想录算法训练营|day16
根节点到最远叶子节点的最长路径上的节点个数(1)递归:max(左子树高度,右子树高度)+1funcmaxDepth(root*TreeNode)int{ifroot==nil{return0}returnmax(
maxDepth
果木26
·
2024-01-28 10:47
代码随想录练习
算法
go
【LeetCode】513. 找树左下角的值(中等)——代码随想录算法训练营Day18
示例1:输入:root=[2,1,3]输出:1示例2:输入:[1,2,3,4,null,5,6,null,null,7]输出:7提示:二叉树的节点个数的范围是[1,104]-231
maxDepth
){
maxDepth
晴雪月乔
·
2024-01-27 23:30
代码随想录算法训练营
#
LeetCode
二叉树
算法
代码随想录算法训练营
二叉树
[二叉树专题]二叉树最大高度|n叉树最大高度
一、二叉树最大高度classSolution{public:intmaxDepth(TreeNode*root){if(root==nullptr)return0;intleft=
maxDepth
(root
一只特立独行的猪( ﹡ˆoˆ﹡
·
2024-01-27 09:35
#力扣牛客刷题
算法
数据结构
【shell-08】之批量重命名
-iname'*.png'-o-iname'*.jpg'-typef-
maxdepth
1`donew=image-$count.
我先森
·
2024-01-27 08:19
shell
shell
重命名
day16打卡
O(N),空间复杂度:O(N)classSolution{public:intmaxDepth(TreeNode*root){if(root==nullptr)return0;return1+max(
maxDepth
clamdown2021
·
2024-01-26 21:47
代码
算法
leetcode
数据结构
深度优先
二叉树的最大深度,判断两个二叉树是否相同,对称二叉树,另一棵树的子树【C语言】
LeetCode)intmaxDepth(structTreeNode*root){if(root==NULL){return0;}//代码走到这里时,root不为空,一定有一层intlefttreedepth=
maxDepth
Nevergive_
·
2024-01-26 05:04
c语言
开发语言
二叉树OJ题目——C语言
-100left),
maxDepth
(root->right))+1
夜夜亮晶晶
·
2024-01-24 14:12
数据结构
一些题
c语言
leetcode
数据结构
树
Easy)1.1题目11.2分析解答classSolution{publicintmaxDepth(TreeNoderoot){if(root==null)return0;returnMath.max(
maxDepth
奔向星辰大海
·
2024-01-20 03:50
代码随想录算法训练营第十六天| 104.二叉树的最大深度、111.二叉树的最小深度、222.完全二叉树的节点个数
LeetCode)解题思路:用递归即可,从下层向上叠加C:intmaxDepth(structTreeNode*root){if(root==NULL)return0;intdepth=0;depth=fmax(
maxDepth
麦城稻香咖啡
·
2024-01-20 02:30
算法
【linux对文件夹下每一个第一级子文件夹压缩成zip格式】
以下是一个示例命令:find/path/to/parent/folder-mindepth1-
maxdepth
1-typed-execzip-r'{}.zip''{}'\;请将/path/to/parent
敏儿要努力
·
2024-01-14 17:55
linux
Linux:只显示文件或只显示目录,并且显示全路径,shell命令怎么写
-mindepth1-
maxdepth
1-typed或find.-
maxdepth
1-typed或ls-p|grep/或ls-d*/2.只显示当前目录下的文件find.
netyeaxi
·
2024-01-12 01:49
linux
shell
linux命令积累
2023-12-091.查找指定目录下第二层目录,一年前的文件find$dir-
maxdepth
1-typed-mtime3652.
海滩上的那乌克丽丽
·
2024-01-05 05:59
linux
运维
服务器
lc543二叉树的直径
最长路径为d-1intans=1;
maxdepth
(root);returnans;publicintmaxdepth(TreeNoderoot){if(root==null)return0;intle
下海的alpha
·
2024-01-03 15:46
java
lc104二叉树的最大深度
递归上述步骤if(root==null)return;intleft=
maxDepth
(root.left);intright=
maxDepth
(root.right);returnMath.max(left
下海的alpha
·
2024-01-03 03:47
java
代码随想录第十五天二叉树part03
递归:classSolution{public:intmaxDepth(TreeNode*root){if(root==nullptr)return0;intleftindex=
maxDepth
(root
m0_56921779
·
2024-01-01 21:03
数据结构
算法
【二叉树】【DFS】104.二叉树的最大深度
TreeNoderoot){if(root==null){return0;}elseif(root.left==null&&root.right==null){return1;}else{returnMath.max(
maxDepth
Allenlzcoder
·
2023-12-30 00:13
dfs
Shell:遍历当前目录下的指定文件
-
maxdepth
1-typef-name"*.jpg"|whileread-r__f;doecho$__fdonefind命令参数说明:.:要遍历的目录,"."
力宁
·
2023-12-29 10:58
linux
bash
Leetcode104. 二叉树的最大深度
1.递归解法classSolution{publicintmaxDepth(TreeNoderoot){if(root==null){return0;}intleft=
maxDepth
(root.left
JAVA开发猿
·
2023-12-20 03:58
数据结构
Leetcode104二叉树的最大深度(递归)
publicintmaxDepth(TreeNoderoot){if(root==null)return0;returnMath.max(
maxDepth
(root.left),
maxDepth
(root.right
我会jvav啊
·
2023-12-20 03:57
leetcode
leetcode
二叉树
java
递归法
二叉树深度
leetcode104 二叉树的最大深度 Leetcode111 二叉树最小深度Leetcode 222完全二叉树节点个数
返回最后孩子高度的最大值+1classSolution{public:intmaxDepth(TreeNode*root){if(root==NULL){return0;}returnmax(
maxDepth
f2388843616
·
2023-12-20 03:25
leetcode
算法
数据结构
559. N 叉树的最大深度
=null){return0;}intmaxChildDepth=0;Listchildren=root.children;for(Nodechild:children){intchildDepth=
maxDepth
LIZHUOLONG1
·
2023-12-19 05:42
LeetCode刷题
算法
Linux Find
/-
maxdepth
1-name'*.c'zf
昉钰
·
2023-12-18 03:54
Linux
linux
运维
服务器
Linux 中 find 查找
对查找出来的内容进行操作1.普通查询find+路径-name"文件名"如查看etc目录下的passwd的文件find/etc-name"passwd"可以对查找进行文件和深度进行限制find/etc-
maxdepth
1
Fly upward
·
2023-12-17 19:25
linux
运维
服务器
二叉树的最大深度
-100left);intrightDepth=
maxDepth
(root->right);returnmaxD
guai_guai_guai
·
2023-12-16 16:34
算法
【二叉树】104.二叉树的最大深度
题目classSolution{publicintmaxDepth(TreeNoderoot){if(root==null){return0;}intleftDepth=
maxDepth
(root.left
Allenlzcoder
·
2023-12-06 12:25
力扣Top100
二叉树
LeetCode 力扣 104. 二叉树的最大深度
publicintmaxDepth(TreeNoderoot){if(root==null){return0;}returnMath.max(
maxDepth
(root.left),
maxDepth
(root.right
wind_liang
·
2023-12-05 10:45
leetcode
leetcode
算法
数据结构
二叉树
二叉树刷题Leetcode
二叉树的最大深度100.相同的树965.单值二叉树104.二叉树的最大深度intmaxDepth(structTreeNode*root){if(root==NULL)return0;intleft=1+
maxDepth
gsfl
·
2023-12-02 09:07
数据结构刷题
leetcode
算法
数据结构
104. 二叉树的最大深度
-100left),
maxDepth
(root->right))+1;}}可调试的代码
霜晨月c
·
2023-12-02 04:00
LeetCode
算法
c++
笔记
leetcode
LeetCode | 二叉树的最大深度
链接这里需要注意的一点是每次有返回值,需要定义变量来保存上一次的值最后取最高的一方加1intmaxDepth(structTreeNode*root){if(root==NULL)returnNULL;intleft=
maxDepth
仍然探索未知中
·
2023-11-30 16:44
LeetCode
leetcode
算法
104. Maximum Depth of Binary Tree
root)return0;returnmax(
maxDepth
(root->left),
maxDepth
(root->right))+1;}
安东可
·
2023-11-29 22:14
LeetCode 力扣 104. 二叉树的最大深度
publicintmaxDepth(TreeNoderoot){if(root==null){return0;}returnMath.max(
maxDepth
(root.left),
maxDepth
(root.right
windliang
·
2023-11-26 01:52
LeetCode104--二叉树最大深度
classSolution{publicintmaxDepth(TreeNoderoot){intleftCon=0;intrightCon=0;if(root==null){return0;}else{leftCon=
maxDepth
剽悍的人生不需要理由
·
2023-11-15 22:10
LeetCode
二叉树最大深度
递归
leetcode-二叉树的最大深度
classSolution{publicintmaxDepth(TreeNoderoot){//终止条件if(root==null)return0;//单层逻辑intleft=
maxDepth
(root.left
橘子恶霸、
·
2023-11-15 22:09
leetcode
算法
b树
leetcode -- 104二叉树的最大深度
packagecom.ym.no104
maxdepth
;/***@authorym*@date2022/05/3013:31:34*@description给定一个二叉树,找出其最大深度。
java能飞翔
·
2023-11-15 22:38
leetcode
leetcode
算法
深度优先
算法通关村第八关|白银|二叉树的深度和高度问题【持续更新】
publicintmaxDepth(TreeNoderoot){if(root==null){return0;}intleftHeight=
maxDepth
(root.left);intrightHeight
星不易
·
2023-11-14 10:10
不易
算法通关村
算法
java
算法通关村
LeetCode 110. Balanced Binary Tree
左孩子平衡and右孩子平衡代码:classSolution{public:boolisBalanced(TreeNode*root){if(root==NULL)returntrue;returnabs(
maxDepth
庾信平生最萧瑟
·
2023-11-12 11:21
LeetCode
DFS
104.Maximum Depth of Binary Tree
代码1:intmaxDepth(TreeNode*root){if(root==NULL)return0;else{intl=
maxDepth
(root->left);intr=
maxDepth
(root
花落花开花满天
·
2023-11-06 06:27
Leetcode 104. 二叉树的最大深度
root)return0;returnmax(
maxDepth
(root->left)+1,maxDe
JehanRio
·
2023-11-01 13:34
Leetcode专栏
leetcode
算法
力扣(104.101)补9.7
classSolution{publicintmaxDepth(TreeNoderoot){if(root==null)return0;elsereturnMath.max(
maxDepth
(root.left
AI紫夜繁星
·
2023-11-01 13:28
力扣
算法
leetcode
java
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他