Learning proyect - 42 Málaga
This proyect is about sorting numbers, there are two stacks and some actions to manipulate the numbers in the stacks.
The problem start with one stack (stack A) filled with numbers and the objetive is to use the following actions to sort them:
sa -> swap the 2 first numbers in stack A.
sb -> swap the 2 first numbers in stack B.
ss -> sa + sb at the same time.
pa -> push the first number in stack B to the top of stack A.
pb -> push the first number in stack A to the top of stack B.
ra -> moves up all the numbers in stack A one position, the first number will become the last.
rb -> moves up all the numbers in stack B one position, the first number will become the last.
rr -> ra + rb at the same time.
rra -> moves down all the numbers in stack A one position, the last number will become the first.
rrb -> moves down all the numbers in stack B one position, the last number will become the first.
rrr -> rra + rrb at the same time