diff options
Merge pull request #9 from keti200125/keti200125-patch
height.cpp
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | Seminar08/height.cpp | 2 |
diff --git a/Seminar08/height.cpp b/Seminar08/height.cpp index 97ba9ab..c115228 100644 --- a/Seminar08/height.cpp +++ b/Seminar08/height.cpp @@ -6,7 +6,7 @@ size_t height(const Tree<T>* tree) { if (!tree) return 0; - return 1 + std::max(heightOfTree(tree->left), heightOfTree(tree->right)); + return 1 + std::max(height(tree->left), height(tree->right)); } int main(){ |
