Skip to content

Commit 9fdaeb5

Browse files
authored
Update 0111.二叉树的最小深度.md / Fix typo
部分Markdown代码块没有标注语言导致代码没有高亮
1 parent 49acc74 commit 9fdaeb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

problems/0111.二叉树的最小深度.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
代码如下:
6666

67-
```
67+
```CPP
6868
int getDepth(TreeNode* node)
6969
```
7070

@@ -74,14 +74,14 @@ int getDepth(TreeNode* node)
7474

7575
代码如下:
7676

77-
```
77+
```CPP
7878
if (node == NULLreturn 0;
7979
```
8080

8181
3. 确定单层递归的逻辑
8282

8383
这块和求最大深度可就不一样了,一些同学可能会写如下代码:
84-
```
84+
```CPP
8585
int leftDepth = getDepth(node->left);
8686
int rightDepth = getDepth(node->right);
8787
int result = 1 + min(leftDepth, rightDepth);

0 commit comments

Comments
 (0)