Update '''0222.完全二叉树的节点个数.md''' Fix Typo

修复部分代码块无高亮
This commit is contained in:
Vox Dai
2024-04-21 09:37:42 +08:00
committed by GitHub
parent 49acc74804
commit 19b76720a2

View File

@ -54,7 +54,7 @@
1. 确定递归函数的参数和返回值参数就是传入树的根节点返回就返回以该节点为根节点二叉树的节点数量所以返回值为int类型。
代码如下:
```
```CPP
int getNodesNum(TreeNode* cur) {
```
@ -62,7 +62,7 @@ int getNodesNum(TreeNode* cur) {
代码如下:
```
```CPP
if (cur == NULL) return 0;
```
@ -70,7 +70,7 @@ if (cur == NULL) return 0;
代码如下:
```
```CPP
int leftNum = getNodesNum(cur->left); // 左
int rightNum = getNodesNum(cur->right); // 右
int treeNum = leftNum + rightNum + 1; // 中