19 lines
273 B
C
19 lines
273 B
C
|
|
#include "pushswap.h"
|
|
|
|
t_list *sa(t_stack **stack, t_list **solution)
|
|
{
|
|
t_stack *a;
|
|
int tmp;
|
|
|
|
a = *stack;
|
|
if (!a->next)
|
|
return (NULL);
|
|
tmp = a->n;
|
|
a->n = a->next->n;
|
|
a->next->n = tmp;
|
|
fill_solution(stack, NULL, solution, ft_strdup("sa"));
|
|
return (NULL);
|
|
}
|
|
|