From 76fe7e20bbdfa97126c306e5fa262c6bc415cad2 Mon Sep 17 00:00:00 2001 From: Hristo Georgiev Date: Thu, 5 Jan 2023 12:39:55 +0200 Subject: Seminar 10 AVLTree BalanceLeft fixed --- Seminar10/AVLTree.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- cgit v1.3.1-23-gd82d