push et swap fonctionnent
This commit is contained in:
@@ -63,12 +63,11 @@ t_list *launch_algo(t_stack *a)
|
||||
|
||||
b = NULL;
|
||||
solution = NULL;
|
||||
ft_lstadd_back(&solution, ft_lstnew(a));
|
||||
ft_lstadd_back(&solution, ft_lstnew(b));
|
||||
fill_solution(&solution, ft_strdup("start"));
|
||||
hugo_sort(&a, &b, &solution);
|
||||
ft_lstadd_back(&solution, ft_lstnew(&a));
|
||||
ft_lstadd_back(&solution, ft_lstnew(&b));
|
||||
fill_solution(solution, ft_strdup("start"));
|
||||
hugo_sort(&a, &b, solution);
|
||||
//bubble_sort(&a, &b, solution);
|
||||
ps_stop(NULL, b, NULL, -1);
|
||||
return (solution);
|
||||
}
|
||||
|
||||
@@ -91,6 +90,5 @@ int main(int ac, char **av)
|
||||
stack = init_stack(ac, av);
|
||||
result = launch_algo(stack);
|
||||
print_result(result, flag);
|
||||
ps_stop(stack, NULL, result, 0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user