This project aims to sort a stack A of integers, using an other stack B and the following set of operations :
saswaps two integers at the top ofstack Apatakes the first element at the top ofstack Band put it at the top ofstack Aratakes the top element ofstack Aand put it at its bottomrratakes the bottom element ofstack Aand put it at its top
There are analog operations for stack B, i.e sb, pb, rb and rrb.
Plus operations to perform on both stacks :
ssperformssaandsbrrperformsraandrbrrrperformsrraandrrb
In the root folder run make, it will produce two executables push_swap and checker.
push_swap expects a list of distinct integers as arguments, it will represent stack A, then ouput the list of operations it performed to sort the stack.
checker expects a list of distinct integers as argumentsm it will respresent stack A, and read a list of operations on stdin, then check if these operations successfully sorted stack A.