a la norme
This commit is contained in:
27
srcs/algo.c
27
srcs/algo.c
@@ -1,33 +1,7 @@
|
||||
|
||||
#include "push_swap.h"
|
||||
|
||||
t_list *dup_n_fill(t_stack *a)
|
||||
{
|
||||
t_list *sort;
|
||||
int *i;
|
||||
int j;
|
||||
|
||||
j = 0;
|
||||
sort = NULL;
|
||||
while(a)
|
||||
{
|
||||
i = (int *)ft_calloc(3, sizeof(int));
|
||||
i[0] = a->n;
|
||||
i[1] = j;
|
||||
i[2] = 0;
|
||||
ft_lstadd_back(&sort, ft_lstnew(i));
|
||||
a = a->next;
|
||||
j++;
|
||||
}
|
||||
return (sort);
|
||||
}
|
||||
|
||||
void hugo_sort(t_stack **a, t_stack **b, t_list *solution)
|
||||
{
|
||||
(void)b;
|
||||
(void)a;
|
||||
(void)solution;
|
||||
|
||||
sa(a, &solution);
|
||||
pb(b, a, &solution);
|
||||
pb(b, a, &solution);
|
||||
@@ -45,4 +19,3 @@ void hugo_sort(t_stack **a, t_stack **b, t_list *solution)
|
||||
rb(b, &solution);
|
||||
rr(a, b, &solution);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user