aboutsummaryrefslogtreecommitdiff
path: root/collections/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'collections/map/map.c')
-rw-r--r--collections/map/map.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/collections/map/map.c b/collections/map/map.c
index c217fa2..321339f 100644
--- a/collections/map/map.c
+++ b/collections/map/map.c
@@ -88,17 +88,17 @@ struct map_node **root;
if (map_height((*root)->left) > map_height((*root)->right)) {
if(map_bal_factor((*root)->left) >= 0) {
- map_rotate_left(root);
+ map_rotate_right(root);
} else {
- map_rotate_left(root);
map_rotate_right(root);
+ map_rotate_left(root);
}
} else {
if (map_bal_factor((*root)->right) >= 0) {
- map_rotate_right(root);
+ map_rotate_left(root);
} else {
- map_rotate_right(root);
map_rotate_left(root);
+ map_rotate_right(root);
}
}