-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrra_reverse_rotate_a.c
23 lines (21 loc) · 1.14 KB
/
rra_reverse_rotate_a.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* rra_reverse_rotate_a.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ael-khni <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/12 07:59:14 by ael-khni #+# #+# */
/* Updated: 2022/01/14 14:22:43 by ael-khni ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
/* rra: reverse rotate a - shift down all elements of stack a b 1.
* the last element becomes the first one. */
void rra_reverse_rotate_a(t_stack *a, int flag)
{
push_elem(a, new_elem(a->bottom->data));
poop_elem(a);
if (!flag)
ft_putstr("rra\n");
}