ajout du script de comparaison
This commit is contained in:
13
srcs/swap.c
13
srcs/swap.c
@@ -4,12 +4,13 @@ void swap(t_stack **stack)
|
||||
{
|
||||
t_stack *tmp;
|
||||
|
||||
tmp = *stack;
|
||||
if (!(tmp->next))
|
||||
return ;
|
||||
*stack = (*stack)->next;
|
||||
tmp->next = (*stack)->next;
|
||||
(*stack)->next = tmp;
|
||||
if (*stack && (*stack)->next)
|
||||
{
|
||||
tmp = *stack;
|
||||
*stack = (*stack)->next;
|
||||
tmp->next = (*stack)->next;
|
||||
(*stack)->next = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
t_list *sa(t_stack **a, t_list **solution)
|
||||
|
||||
Reference in New Issue
Block a user