Epitech Tech 1 Project
This project is constituted of two lists, "l_a" and "l_b". At the beginning, l_b is empty and l_a contains a certain amount of positive or negative numbers. The goal of the project is to fill l_a of l_b in ascending order. For this, we only have a certain operations.
- sa : swap the first two elements of l_a (nothing will happen if there aren’t enough elements).
- pa : take the first element from l_b and move it to the first position on the l_a list (nothing will happen if l_b is empty).
- pb : take the first element from l_a and move it to the first position on the l_b list (nothing will happen if l_a is empty).
make re
./push_swap 2 1 3 5 4
- sa pb pb pb sa pb pa pa pa pa