Website Summary Files Commits Branches @commit @diff @stats
path: root / Seminar08 / height.cpp
diff options
context:
space:
mode:
Commit59fed4451128e87883982f82bafeac93616b9f72 (patch)
Author
 Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com>
2023-08-12 17:49:17 +0200
Committer
 GitHub <noreply@github.com>
2023-08-12 17:49:17 +0200
Files323856db5c77c1bfe7ecd13f904e10a804e5b247 /Seminar08/height.cpp
Data-structures-and-algorithms-59fed4451128e87883982f82bafeac93616b9f72.tar
Data-structures-and-algorithms-59fed4451128e87883982f82bafeac93616b9f72.tar.gz
Data-structures-and-algorithms-59fed4451128e87883982f82bafeac93616b9f72.zip
Parent5004d6b16cd31bd344b97580e084a573927695ba (diff)
Parent12d850dcec6e762f48e3c8710ce46976c197c0eb (diff)
Merge pull request #9 from keti200125/keti200125-patch
height.cpp
1 files changed, 1 insertions, 1 deletions
-rw-r--r--Seminar08/height.cpp2
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(){