ajout du script de comparaison

This commit is contained in:
hugogogo
2021-06-29 20:25:12 +02:00
parent d69bb36234
commit f081f15f58
15 changed files with 102 additions and 33 deletions

View File

@@ -5,15 +5,16 @@ void rotate(t_stack **stack)
t_stack *tmp;
t_stack *first;
first = *stack;
tmp = *stack;
if (!tmp || !(tmp->next))
return ;
*stack = (*stack)->next;
while (tmp->next)
tmp = tmp->next;
tmp->next = first;
first->next = NULL;
if (*stack && (*stack)->next)
{
first = *stack;
tmp = *stack;
*stack = (*stack)->next;
while (tmp->next)
tmp = tmp->next;
tmp->next = first;
first->next = NULL;
}
}
t_list *ra(t_stack **a, t_list **lst)