a la norme

This commit is contained in:
hugogogo
2021-06-27 20:05:27 +02:00
parent f3c660cfd5
commit 98203c9ab5
5 changed files with 12 additions and 43 deletions

View File

@@ -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);
}