We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fd15c6 commit 35ae947Copy full SHA for 35ae947
110/step5.cpp
@@ -2,20 +2,20 @@
2
class Solution {
3
public:
4
bool isBalanced(TreeNode* root) {
5
- return getHeight(root) != -1;
+ return GetHeight(root) != -1;
6
}
7
8
- int getHeight(TreeNode* root) {
+ int GetHeight(TreeNode* root) {
9
if (!root) {
10
return 0;
11
12
13
- int left_height = getHeight(root->left);
+ int left_height = GetHeight(root->left);
14
if (left_height == -1) {
15
return -1;
16
17
18
- int right_height = getHeight(root->right);
+ int right_height = GetHeight(root->right);
19
if (right_height == -1) {
20
21
0 commit comments