From 805d5921604c63ec40bdc9464adc5972ea5c7995 Mon Sep 17 00:00:00 2001 From: David Gailleton Date: Tue, 6 Jan 2026 12:34:15 +0000 Subject: [PATCH] ? --- algorithms/utils/pre_sort.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/algorithms/utils/pre_sort.c b/algorithms/utils/pre_sort.c index bdad641..46459a1 100644 --- a/algorithms/utils/pre_sort.c +++ b/algorithms/utils/pre_sort.c @@ -6,7 +6,7 @@ /* By: dgaillet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/12/15 14:21:20 by dgaillet #+# #+# */ -/* Updated: 2025/12/15 14:39:21 by dgaillet ### ########lyon.fr */ +/* Updated: 2025/12/15 14:59:52 by dgaillet ### ########lyon.fr */ /* */ /* ************************************************************************** */ @@ -39,6 +39,8 @@ void sort_three_a(t_stacks *stacks) { if (check_order(stacks->a)) return ; + if (stacks->a->value > stacks->a->next->value) + sa(stacks); optimal_rotate(stacks, r_to_lowest(stacks->a, 3), 3, 'a'); if (stacks->a->next->value > stacks->a->previous->value) {