42school algorythm project. The goal is to sort given stack of integers, using a limited number of operations and one more additional stack.
Available operation:
- Swap two numbers at the top of the stack. [sa, sb, ss]
- Rotate number from the top to the bottom of the stack. [ra, rb, rr]
- Rotate number from the bottom to the top of the stack. [rra, rrb, rrr]
- Push number from the one stack the another. [pa, pb]
Usage ./push_swap [numbers] | ./checker [numbers]
push_swap prints the necessary operation to sort stack;
checker checks will be the stack sorted using this operations;
To visualize sorting process use ./run.sh [n],
python2.x and matplotlib required
where n - quantity of numbers, which will be generated randomly.