From a41bf1c4c3e7e4b4642bee5f6e5aafbdb8f29773 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 21 Jan 2020 20:04:37 +0100 Subject: Removed buged feature in sort and added short test script --- src/push_swap/sort.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/push_swap/sort.c') diff --git a/src/push_swap/sort.c b/src/push_swap/sort.c index 4804591..e1a9bca 100644 --- a/src/push_swap/sort.c +++ b/src/push_swap/sort.c @@ -88,13 +88,6 @@ static void push_swap_qsort_rec(t_stack *main, t_stack *tmp, int main_frame, int { if (frame_length(main, main_frame) < 2) return ; - if (frame_length(main, main_frame) == 2) - { - if (main->tag == STACK_A ? stack_peek(main) > main->elements[stack_length(main) - 1] : - stack_peek(main) < main->elements[stack_length(main) - 1]) - stack_swap(main); - return ; - } push_swap_qsort_partition(main, tmp, main_frame); -- cgit