Skip to content

Commit 35ae947

Browse files
committed
Update method name
1 parent 4fd15c6 commit 35ae947

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

110/step5.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
class Solution {
33
public:
44
bool isBalanced(TreeNode* root) {
5-
return getHeight(root) != -1;
5+
return GetHeight(root) != -1;
66
}
77

8-
int getHeight(TreeNode* root) {
8+
int GetHeight(TreeNode* root) {
99
if (!root) {
1010
return 0;
1111
}
1212

13-
int left_height = getHeight(root->left);
13+
int left_height = GetHeight(root->left);
1414
if (left_height == -1) {
1515
return -1;
1616
}
1717

18-
int right_height = getHeight(root->right);
18+
int right_height = GetHeight(root->right);
1919
if (right_height == -1) {
2020
return -1;
2121
}

0 commit comments

Comments
 (0)