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,17 +5,18 @@ void reverse_rotate(t_stack **stack)
t_stack *tmp;
t_stack *before;
tmp = *stack;
if (!tmp || !(tmp->next))
return ;
while (tmp->next)
if (*stack && (*stack)->next)
{
before = tmp;
tmp = tmp->next;
tmp = *stack;
while (tmp->next)
{
before = tmp;
tmp = tmp->next;
}
tmp->next = *stack;
*stack = tmp;
before->next = NULL;
}
tmp->next = *stack;
*stack = tmp;
before->next = NULL;
}
t_list *rra(t_stack **a, t_list **lst)