Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitbc717caaaf0dd5d9ba989d3c423839483af6f137 (patch)
Author
 Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com>
2023-01-05 12:43:42 +0200
Committer
 GitHub <noreply@github.com>
2023-01-05 12:43:42 +0200
Files0e8acec8be82c0e15900a324147b2d63720db53c
Data-structures-and-algorithms-bc717caaaf0dd5d9ba989d3c423839483af6f137.tar
Data-structures-and-algorithms-bc717caaaf0dd5d9ba989d3c423839483af6f137.tar.gz
Data-structures-and-algorithms-bc717caaaf0dd5d9ba989d3c423839483af6f137.zip
Parent27c4ede68074617b373d8e990932f3d22d34f8ab (diff)
Parent76fe7e20bbdfa97126c306e5fa262c6bc415cad2 (diff)
Merge pull request #6 from hrisge/main
Seminar 10 AVLTree BalanceLeft fixed
1 files changed, 2 insertions, 2 deletions
-rw-r--r--Seminar10/AVLTree.hpp4
diff --git a/Seminar10/AVLTree.hpp b/Seminar10/AVLTree.hpp
index 2b4fba7..2c0a758 100644
--- a/Seminar10/AVLTree.hpp
+++ b/Seminar10/AVLTree.hpp
@@ -48,12 +48,12 @@ private:
if (rootBalance == -2) {
if (leftBalance == 1) {
- rotateRight(r->left);
+ rotateLeft(r->left);
updateHeight(r->left->left);
updateHeight(r->left);
}
- rotateLeft(r);
+ rotateRight(r);
updateHeight(r->left);
updateHeight(r);
}