From 4545c9f4dc339e94bf6ebe0963db55e9dcc131bd Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Mon, 15 Apr 2024 17:54:43 +0200 Subject: Change stacks from linked lists to rotating arrays --- sorting.c | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'sorting.c') diff --git a/sorting.c b/sorting.c index 6790fa2..f04304f 100644 --- a/sorting.c +++ b/sorting.c @@ -6,48 +6,14 @@ /* By: dkaiser content >> bit) % 2 == 0) - run_command(stack_a, stack_b, cmds, PB); - else if ((*stack_a)->next) - run_command(stack_a, stack_b, cmds, RA); - i++; - } - while (*stack_b) - run_command(stack_a, stack_b, cmds, PA); -} - -static void stack_radixsort(t_list **stack_a, t_list **stack_b, t_list **cmds) -{ - int bit; - int max_bits; - - bit = 0; - max_bits = 9; - while (bit < max_bits) - { - radixsort_step(stack_a, stack_b, cmds, bit); - bit++; - } -} -void stack_sort(t_list **stack_a, t_list **stack_b, t_list **cmds) +t_list *stack_sort(t_stack *stack_a, t_stack *stack_b) { - stack_radixsort(stack_a, stack_b, cmds); + return NULL; } -- cgit v1.2.3