Merge pull request #1346 from areslk/areslk-patch-1

Update 0110.平衡二叉树.md
This commit is contained in:
程序员Carl
2022-06-10 09:35:29 +08:00
committed by GitHub

View File

@ -208,7 +208,7 @@ int getHeight(TreeNode* node) {
```CPP ```CPP
class Solution { class Solution {
public: public:
// 返回以该节点为根节点的二叉树的高度,如果不是二叉搜索树了则返回-1 // 返回以该节点为根节点的二叉树的高度,如果不是平衡二叉树了则返回-1
int getHeight(TreeNode* node) { int getHeight(TreeNode* node) {
if (node == NULL) { if (node == NULL) {
return 0; return 0;